Commit d689cfbdf6435b5016b1dbf540b5f72fe879357b

Con Kolivas 2012-02-13T10:06:26

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/ocl.c b/ocl.c
index 9b51cea..e273064 100644
--- a/ocl.c
+++ b/ocl.c
@@ -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);