mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Use only the one jump in ocl.c to bypass binary saves for osx opencl.
This commit is contained in:
parent
0a8f584909
commit
2643ad1b22
12
ocl.c
12
ocl.c
@ -502,8 +502,8 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
FILE *binaryfile;
|
FILE *binaryfile;
|
||||||
size_t *binary_sizes = NULL;
|
size_t *binary_sizes;
|
||||||
char **binaries = NULL;
|
char **binaries;
|
||||||
int pl;
|
int pl;
|
||||||
char *source = file_contents(filename, &pl);
|
char *source = file_contents(filename, &pl);
|
||||||
size_t sourceSize[] = {(size_t)pl};
|
size_t sourceSize[] = {(size_t)pl};
|
||||||
@ -514,11 +514,6 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
if (!source)
|
if (!source)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* OSX OpenCL breaks reading off binaries with >1 GPU so always build
|
|
||||||
* from source. */
|
|
||||||
#ifdef __APPLE__
|
|
||||||
goto build;
|
|
||||||
#endif
|
|
||||||
binary_sizes = calloc(sizeof(size_t) * MAX_GPUDEVICES * 4, 1);
|
binary_sizes = calloc(sizeof(size_t) * MAX_GPUDEVICES * 4, 1);
|
||||||
if (unlikely(!binary_sizes)) {
|
if (unlikely(!binary_sizes)) {
|
||||||
applog(LOG_ERR, "Unable to calloc binary_sizes");
|
applog(LOG_ERR, "Unable to calloc binary_sizes");
|
||||||
@ -667,7 +662,10 @@ build:
|
|||||||
}
|
}
|
||||||
|
|
||||||
prog_built = true;
|
prog_built = true;
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
/* OSX OpenCL breaks reading off binaries with >1 GPU so always build
|
||||||
|
* from source. */
|
||||||
goto built;
|
goto built;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user