summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-10-18 23:53:44 +0200
committerMichael Meeks <michael.meeks@collabora.com>2016-10-24 16:42:40 +0000
commit5f36c66183049522977a386d9afce462ac5d3ec0 (patch)
tree7bb98672d190c6bb857fe87949e265d6ae6ad790 /include
parent3f373500282c926031eed4f995ca8d51402ed187 (diff)
tdf#103395 opencl: don't initialize OpenCL when disabled
If SAL_DISABLE_OPENCL is set we don't want to do any kind of OpenCL initialization. Put an extra guard in fillOpenCLInfo (and similar methods in opencl package) to prevent that. Put the check if OpenCL can be used into one place which checks SAL_DISABLE_OPENCL and UseOpenCL in configuration. Reviewed-on: https://gerrit.libreoffice.org/30025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 21e8ed8b5f032f63012a7ee84bce64fac218154f) Change-Id: Icc216d4299d3a7942843117ab9b9411de8075b11 Reviewed-on: https://gerrit.libreoffice.org/30220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/opencl/openclwrapper.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx
index 233412fdb4eb..5f71b2a205f3 100644
--- a/include/opencl/openclwrapper.hxx
+++ b/include/opencl/openclwrapper.hxx
@@ -26,7 +26,8 @@
#include <cstdio>
-namespace opencl {
+namespace opencl
+{
struct KernelEnv
{
@@ -56,6 +57,8 @@ struct OPENCL_DLLPUBLIC GPUEnv
extern OPENCL_DLLPUBLIC GPUEnv gpuEnv;
extern OPENCL_DLLPUBLIC sal_uInt64 kernelFailures;
+OPENCL_DLLPUBLIC bool canUseOpenCL();
+
OPENCL_DLLPUBLIC bool generatBinFromKernelSource( cl_program program, const char * clFileName );
OPENCL_DLLPUBLIC bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuEnv, const char* filename, int idx);
OPENCL_DLLPUBLIC void setKernelEnv( KernelEnv *envInfo );