Browse Source

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

nfactor-troky
Con Kolivas 13 years ago
parent
commit
d689cfbdf6
  1. 2
      ocl.c

2
ocl.c

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

Loading…
Cancel
Save