summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-09-18 13:05:31 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-09-19 17:03:27 +0200
commit77201250b47a267b4474a394d748c934acfaef39 (patch)
treee23b6a15ef7abc7186119caca218b9aeda54ad97 /sc
parentee19608f940d0985f4ba4cd918bc53aaf25f0301 (diff)
fall back to compiling from source if binary failed
Change-Id: I8e8d8fb5b1da18c44e1537f97317d4e5b57c47b6
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index f469aac7655e..0fe2220f3218 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -473,14 +473,16 @@ int OpenclDevice::compileKernelFile( GPUEnv *gpuInfo, const char *buildOption )
&binary_status, &clStatus );
if(clStatus != CL_SUCCESS)
{
+ // something went wrong, fall back to compiling from source
+ bBinaryExisted = false;
for(size_t i = 0; i < numDevices; ++i)
{
delete[] pBinary[i];
}
}
- CHECK_OPENCL( clStatus, "clCreateProgramWithBinary" );
}
- else
+
+ if(!bBinaryExisted)
{
// create a CL program using the kernel source
fprintf(stderr, "Create kernel from source\n");