diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-07-11 14:45:56 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-07-11 14:45:56 +0400 |
commit | c25240ad547e579381b8ae4cdb7b7b961d0af2cb (patch) | |
tree | 408cdbff6919db8a8a06658633351e164e3b5ee2 /source/blender/compositor/intern/COM_OpenCLDevice.cpp | |
parent | 74625c8d54cf19f4eac4a007cc2a8b3b56f621b2 (diff) |
Compositor read buffers work directly on the memory buffer.
This way we can remove the memoryBuffers parameter in the executePixels,
and (de)initializeTileData methods
Diffstat (limited to 'source/blender/compositor/intern/COM_OpenCLDevice.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_OpenCLDevice.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cpp b/source/blender/compositor/intern/COM_OpenCLDevice.cpp index eae1ffeb08a..63f75681779 100644 --- a/source/blender/compositor/intern/COM_OpenCLDevice.cpp +++ b/source/blender/compositor/intern/COM_OpenCLDevice.cpp @@ -65,11 +65,16 @@ void OpenCLDevice::execute(WorkPackage *work) executionGroup->finalizeChunkExecution(chunkNumber, inputBuffers); } - cl_mem OpenCLDevice::COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader *reader) { + return COM_clAttachMemoryBufferToKernelParameter(kernel, parameterIndex, offsetIndex, cleanup, inputMemoryBuffers, (ReadBufferOperation*)reader); +} + +cl_mem OpenCLDevice::COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, ReadBufferOperation *reader) +{ cl_int error; - MemoryBuffer *result = (MemoryBuffer *)reader->initializeTileData(NULL, inputMemoryBuffers); + + MemoryBuffer *result = (MemoryBuffer *)reader->getInputMemoryBuffer(inputMemoryBuffers); const cl_image_format imageFormat = { CL_RGBA, |