diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-07-08 17:03:09 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-07-08 17:03:09 +0400 |
commit | 45aeee6a34e71060e672fba2ea6713e8f04659d0 (patch) | |
tree | cef1574660793bcb07850ef1d765053673838cb8 /source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp | |
parent | 4bc818d240566e18a073efaaf8924960522a6260 (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_VariableSizeBokehBlurOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp index 7ddcb78b61f..90fd0f04ea4 100644 --- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp @@ -130,15 +130,13 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me } -static cl_kernel defocusKernel = 0; void VariableSizeBokehBlurOperation::executeOpenCL(OpenCLDevice* device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp) { - if (!defocusKernel) { - defocusKernel = device->COM_clCreateKernel("defocusKernel", NULL); - } + cl_kernel defocusKernel = device->COM_clCreateKernel("defocusKernel", NULL); + cl_int step = this->getStep(); cl_int maxBlur = this->m_maxBlur; cl_float threshold = this->m_threshold; |