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

Revert "Don't explicitly retain the cl program as it is of no benefit to do so and may lead to problems when trying to release the program."

This reverts commit 32910463a3124265b56aca48a6c0fbb107ccfb70.

Turns out this does help.
This commit is contained in:
Con Kolivas 2012-01-28 16:26:53 +11:00
parent 80650dd919
commit 25caca9086

12
ocl.c
View File

@ -465,6 +465,12 @@ build:
return NULL;
}
clRetainProgram(clState->program);
if (status != CL_SUCCESS) {
applog(LOG_ERR, "Error: Retaining Program (clRetainProgram)");
return NULL;
}
/* create a cl program executable for all the devices specified */
char *CompilerOptions = calloc(1, 256);
@ -588,6 +594,12 @@ build:
applog(LOG_ERR, "Error: Loading Binary into cl_program (clCreateProgramWithBinary)");
return NULL;
}
clRetainProgram(clState->program);
if (status != CL_SUCCESS) {
applog(LOG_ERR, "Error: Retaining Program (clRetainProgram)");
return NULL;
}
}
free(source);