Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2012-07-08 17:03:09 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-07-08 17:03:09 +0400
commit45aeee6a34e71060e672fba2ea6713e8f04659d0 (patch)
treecef1574660793bcb07850ef1d765053673838cb8 /source/blender/compositor/operations/COM_BokehBlurOperation.cpp
parent4bc818d240566e18a073efaaf8924960522a6260 (diff)
Multi device OpenCL did not work.
case was that cached kernels were used by both devices in separate threads. removed the cached kernels.
Diffstat (limited to 'source/blender/compositor/operations/COM_BokehBlurOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index fb06f6d3761..e83ad4824e4 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -160,15 +160,13 @@ bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
return false;
}
-static cl_kernel kernel = 0;
void BokehBlurOperation::executeOpenCL(OpenCLDevice* device,
MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp,
list<cl_kernel> *clKernelsToCleanUp)
{
- if (!kernel) {
- kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL);
- }
+ cl_kernel kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL);
+
cl_int radius = this->getWidth() * this->m_size / 100.0f;
cl_int step = this->getStep();