diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-07-04 15:30:16 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-07-04 15:48:35 +0300 |
commit | 743b111cf62ef42ead3d8dd6a4aefbb884ce8ee4 (patch) | |
tree | 0204ef2f1b2fb9da6beb24bde8cc833163adf9ca | |
parent | 7e00a3690edbf71d6c3e6c0670875485f65c567d (diff) |
Opaque binary data is opaque binary data
No need to append a newline surely. At least in Apple's OpenCL doing
that seems to invalidate a binary OpenCL blob.
Change-Id: I68bb12d5071f6452afe5a47ddf510f7e8e60cf3e
-rw-r--r-- | sc/source/core/opencl/openclwrapper.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx index 9b9feaa24bb9..aa3ce698452f 100644 --- a/sc/source/core/opencl/openclwrapper.cxx +++ b/sc/source/core/opencl/openclwrapper.cxx @@ -441,16 +441,13 @@ int OpenclDevice::CompileKernelFile(GPUEnv *gpuInfo, const char *buildOption) { return 0; } - binary = (char*) malloc(length + 2); + binary = (char*) malloc(length); if (!binary) { return 0; } - memset(binary, 0, length + 2); + memset(binary, 0, length); b_error |= fread(binary, 1, length, fd) != length; - if (binary[length - 1] != '\n') { - binary[length++] = '\n'; - } fclose(fd); fd = NULL; |