summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-12 13:39:31 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-12 13:41:12 +0200
commitc42cea37f16c2ef95c2983ae09a048fa6f016b13 (patch)
tree9c4b85cab9ab2b6a2bd652684efd90550e13e083
parentKeep also the platform vendor in ds_device (diff)
downloadcore-c42cea37f16c2ef95c2983ae09a048fa6f016b13.tar.gz
core-c42cea37f16c2ef95c2983ae09a048fa6f016b13.zip
Expand tiny misleadingly named 'registerOpenCLKernel' at its only call site
The function did not register any OpenCL kernel;) Change-Id: Iebba89bc39d3035ff0d39d9cfa8ec72d4ebf217a
-rw-r--r--sc/source/core/inc/openclwrapper.hxx1
-rw-r--r--sc/source/core/opencl/openclwrapper.cxx10
2 files changed, 3 insertions, 8 deletions
diff --git a/sc/source/core/inc/openclwrapper.hxx b/sc/source/core/inc/openclwrapper.hxx
index bc3957f6641c..1f11ffcdec7c 100644
--- a/sc/source/core/inc/openclwrapper.hxx
+++ b/sc/source/core/inc/openclwrapper.hxx
@@ -75,7 +75,6 @@ public:
static bool bIsInited;
static OString maCacheFolder;
- static void registerOpenCLKernel();
static bool initOpenCLRunEnv( GPUEnv *gpu );
static void releaseOpenCLEnv( GPUEnv *gpuInfo );
static bool initOpenCLRunEnv( int argc );
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 23db69e7740e..0c01274782d0 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -81,12 +81,6 @@ OString getCacheFolder()
OString OpenCLDevice::maCacheFolder = getCacheFolder();
-void OpenCLDevice::registerOpenCLKernel()
-{
- if ( !gpuEnv.mnIsUserCreated )
- memset( &gpuEnv, 0, sizeof(gpuEnv) );
-}
-
void OpenCLDevice::setKernelEnv( KernelEnv *envInfo )
{
envInfo->mpkContext = gpuEnv.mpContext;
@@ -437,7 +431,9 @@ bool OpenCLDevice::initOpenCLRunEnv( int argc )
if ( !bIsInited )
{
- registerOpenCLKernel();
+ if ( !gpuEnv.mnIsUserCreated )
+ memset( &gpuEnv, 0, sizeof(gpuEnv) );
+
//initialize devices, context, command_queue
bool status = initOpenCLRunEnv( &gpuEnv );
if ( status )