mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Retain cl program after successfully loading a binary image.
This commit is contained in:
parent
55bd031db3
commit
60c701457a
10
ocl.c
10
ocl.c
@ -462,11 +462,17 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
free(binaries[gpu]);
|
free(binaries[gpu]);
|
||||||
goto build;
|
goto build;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clRetainProgram(clState->program);
|
||||||
|
if (status != CL_SUCCESS) {
|
||||||
|
applog(LOG_ERR, "Error: Retaining Program (clRetainProgram)");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
fclose(binaryfile);
|
fclose(binaryfile);
|
||||||
if (opt_debug)
|
if (opt_debug)
|
||||||
applog(LOG_DEBUG, "Loaded binary image %s", binaryfilename);
|
applog(LOG_DEBUG, "Loaded binary image %s", binaryfilename);
|
||||||
|
|
||||||
free(binaries[gpu]);
|
|
||||||
goto built;
|
goto built;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -636,9 +642,9 @@ build:
|
|||||||
}
|
}
|
||||||
fclose(binaryfile);
|
fclose(binaryfile);
|
||||||
}
|
}
|
||||||
|
built:
|
||||||
if (binaries[gpu])
|
if (binaries[gpu])
|
||||||
free(binaries[gpu]);
|
free(binaries[gpu]);
|
||||||
built:
|
|
||||||
free(binaries);
|
free(binaries);
|
||||||
free(binary_sizes);
|
free(binary_sizes);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user