1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

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

This commit is contained in:
Con Kolivas 2012-07-15 13:31:03 +10:00
parent 6a02f8d94a
commit 884f83f313

2
ocl.c
View File

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