1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

Try to load a binary if we've defaulted to the poclbm kernel on SDK2.6

This commit is contained in:
Con Kolivas 2012-02-13 10:06:26 +11:00
parent 3057b701e7
commit d689cfbdf6

2
ocl.c
View File

@ -427,6 +427,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
strcat(binaryfilename, numbuf);
strcat(binaryfilename, ".bin");
loadbin:
binaryfile = fopen(binaryfilename, "rb");
if (!binaryfile) {
applog(LOG_DEBUG, "No binary found, generating from source");
@ -504,6 +505,7 @@ build:
sprintf(numbuf, "%d", (int)sizeof(long));
strcat(binaryfilename, numbuf);
strcat(binaryfilename, ".bin");
goto loadbin;
}
clState->program = clCreateProgramWithSource(clState->context, 1, (const char **)&source, sourceSize, &status);