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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-10-06 16:59:26 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-06 18:21:37 +0400
commit247b869967812891f6b77585184a3b09f3f16a18 (patch)
treef3d6231787556630762e6d9e46dc6ba3bc2514d0 /source/blender/compositor/operations/COM_GaussianYBlurOperation.h
parenta9521c428eeacd7fa05ee60badf4d04361787252 (diff)
Compositor: implement OpenCL backend for gaussian blur
Pretty much straightforward change which gives around 30% speedup on my laptop and around 2x speedup on desktop in the BI (which uses gts580). Tested with huge blurs (like 10% of blur) which was rather common during Caminandes. For now OpenCL is only limited for blur size more than 100 pixels. This is a bit experimental still, feedback is welcome. Reviewers: jbakker, lukastoenne Subscribers: ton Differential Revision: https://developer.blender.org/D576
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianYBlurOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.h b/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
index 22b6562077d..4b5751c0968 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
@@ -40,7 +40,12 @@ public:
* the inner loop of this program
*/
void executePixel(float output[4], int x, int y, void *data);
-
+
+ void executeOpenCL(OpenCLDevice *device,
+ MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
+ MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp,
+ list<cl_kernel> *clKernelsToCleanUp);
+
/**
* @brief initialize the execution
*/
@@ -53,5 +58,9 @@ public:
void *initializeTileData(rcti *rect);
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
+
+ void checkOpenCL() {
+ this->setOpenCL(m_data.sizex >= 128);
+ }
};
#endif