Browse Source

opencl: Remove support for "OCL1" kernel define (indicated OpenCL 1.1+)

Luke Dashjr 11 years ago
parent
commit
e2f08af285
2 changed files with 0 additions and 18 deletions
  1. 0 17
      ocl.c
  2. 0 1
      ocl.h

+ 0 - 17
ocl.c

@@ -595,20 +595,6 @@ _clState *opencl_create_clState(unsigned int gpu, char *name, size_t nameSize)
 		clState->hasBitAlign = true;
 	free(extensions);
 
-	/* Check for OpenCL >= 1.0 support, needed for global offset parameter usage. */
-	char * devoclver = malloc(1024);
-	const char * ocl10 = "OpenCL 1.0";
-
-	status = clGetDeviceInfo(devices[gpu], CL_DEVICE_VERSION, 1024, (void *)devoclver, NULL);
-	if (status != CL_SUCCESS) {
-		applog(LOG_ERR, "Error %d: Failed to clGetDeviceInfo when trying to get CL_DEVICE_VERSION", status);
-		return NULL;
-	}
-	find = strstr(devoclver, ocl10);
-	if (!find)
-		clState->hasOpenCL11plus = true;
-	free(devoclver);
-
 	status = clGetDeviceInfo(devices[gpu], CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, sizeof(cl_uint), (void *)&clState->preferred_vwidth, NULL);
 	if (status != CL_SUCCESS) {
 		applog(LOG_ERR, "Error %d: Failed to clGetDeviceInfo when trying to get CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT", status);
@@ -1066,9 +1052,6 @@ build:
 	if (kernelinfo->goffset)
 		strcat(CompilerOptions, " -D GOFFSET");
 
-	if (!clState->hasOpenCL11plus)
-		strcat(CompilerOptions, " -D OCL1");
-
 	applog(LOG_DEBUG, "CompilerOptions: %s", CompilerOptions);
 	status = bfg_clBuildProgram(&kernelinfo->program, clState->devid, CompilerOptions);
 	free(CompilerOptions);

+ 0 - 1
ocl.h

@@ -38,7 +38,6 @@ struct _clState {
 	void * cldata;
 #endif
 	bool hasBitAlign;
-	bool hasOpenCL11plus;
 	cl_uint preferred_vwidth;
 	cl_uint vwidth;
 	size_t max_work_size;