[Libreoffice-commits] core.git: sc/source
Tor Lillqvist
tml at iki.fi
Sat Jun 29 00:40:13 PDT 2013
sc/source/core/opencl/openclwrapper.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 34dc6baf2c61f4127e6d8d89c92d8e4c37684ff5
Author: Tor Lillqvist <tml at iki.fi>
Date: Sat Jun 29 10:08:38 2013 +0300
Try to fix compilation against an older SDK
Change-Id: Idd4d01c61ccba493554e359bc6ff4298e39633e3
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 829283d..09a9f0a 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -419,10 +419,13 @@ int OpenclDevice::CompileKernelFile(GPUEnv *gpuInfo, const char *buildOption) {
source_size[0] = strlen(source);
binaryExisted = 0;
if ((binaryExisted = BinaryGenerated(filename, &fd)) == 1) {
+#ifdef CL_CONTEXT_NUM_DEVICES
status = clGetContextInfo(gpuInfo->context, CL_CONTEXT_NUM_DEVICES,
sizeof(numDevices), &numDevices, NULL);
CHECK_OPENCL(status)
-
+#else
+ numDevices = 1; // ???
+#endif
devices = (cl_device_id*) malloc(sizeof(cl_device_id) * numDevices);
if (devices == NULL) {
return 0;
More information about the Libreoffice-commits
mailing list