Browse Source

Allow more platforms to be probed if first does not return GPUs.

Con Kolivas 13 years ago
parent
commit
884f83f313
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ocl.c

+ 2 - 0
ocl.c

@@ -118,6 +118,8 @@ int clDevicesNum(void) {
 		status = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, NULL, &numDevices);
 		if (status != CL_SUCCESS) {
 			applog(LOG_ERR, "Error %d: Getting Device IDs (num)", status);
+			if (i < numPlatforms - 1)
+				continue;
 			return -1;
 		}
 		applog(LOG_INFO, "Platform %d devices: %d", i, numDevices);