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 | |
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')
20 files changed, 64 insertions, 73 deletions
diff --git a/source/blender/compositor/intern/COM_CPUDevice.cpp b/source/blender/compositor/intern/COM_CPUDevice.cpp index 95462b3c384..7029aa032cc 100644 --- a/source/blender/compositor/intern/COM_CPUDevice.cpp +++ b/source/blender/compositor/intern/COM_CPUDevice.cpp @@ -29,10 +29,9 @@ void CPUDevice::execute(WorkPackage *work) rcti rect; executionGroup->determineChunkRect(&rect, chunkNumber); - MemoryBuffer **inputBuffers = executionGroup->getInputBuffersCPU(); - executionGroup->getOutputNodeOperation()->executeRegion(&rect, chunkNumber, inputBuffers); + executionGroup->getOutputNodeOperation()->executeRegion(&rect, chunkNumber); - executionGroup->finalizeChunkExecution(chunkNumber, inputBuffers); + executionGroup->finalizeChunkExecution(chunkNumber, NULL); } diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 90f4ba85c78..1e42dba001a 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -372,23 +372,6 @@ void ExecutionGroup::execute(ExecutionSystem *graph) delete[] chunkOrder; } -MemoryBuffer **ExecutionGroup::getInputBuffersCPU() -{ - vector<MemoryProxy *> memoryproxies; - unsigned int index; - - this->determineDependingMemoryProxies(&memoryproxies); - MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->m_cachedMaxReadBufferOffset]; - for (index = 0; index < this->m_cachedMaxReadBufferOffset; index++) { - memoryBuffers[index] = NULL; - } - for (index = 0; index < this->m_cachedReadOperations.size(); index++) { - ReadBufferOperation *readOperation = (ReadBufferOperation *)this->m_cachedReadOperations[index]; - memoryBuffers[readOperation->getOffset()] = readOperation->getMemoryProxy()->getBuffer(); - } - return memoryBuffers; -} - MemoryBuffer **ExecutionGroup::getInputBuffersOpenCL(int chunkNumber) { rcti rect; diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp index ff841092848..801505e9d39 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp @@ -129,6 +129,13 @@ void ExecutionSystem::execute() operation->setbNodeTree(this->m_context.getbNodeTree()); operation->initExecution(); } + for (index = 0; index < this->m_operations.size(); index++) { + NodeOperation *operation = this->m_operations[index]; + if (operation->isReadBufferOperation()) { + ReadBufferOperation *readOperation = (ReadBufferOperation *)operation; + readOperation->updateMemoryBuffer(); + } + } for (index = 0; index < this->m_groups.size(); index++) { ExecutionGroup *executionGroup = this->m_groups[index]; executionGroup->setChunksize(this->m_context.getChunksize()); diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h index d316cfa0aa4..0de2f6aef5d 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.h +++ b/source/blender/compositor/intern/COM_NodeOperation.h @@ -134,7 +134,7 @@ public: * @param chunkNumber the chunkNumber to be calculated * @param memoryBuffers all input MemoryBuffer's needed */ - virtual void executeRegion(rcti *rect, unsigned int chunkNumber, MemoryBuffer **memoryBuffers) {} + virtual void executeRegion(rcti *rect, unsigned int chunkNumber) {} /** * @brief when a chunk is executed by an OpenCLDevice, this method is called 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, diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.h b/source/blender/compositor/intern/COM_OpenCLDevice.h index 30a90dabc3e..577df5caf77 100644 --- a/source/blender/compositor/intern/COM_OpenCLDevice.h +++ b/source/blender/compositor/intern/COM_OpenCLDevice.h @@ -28,6 +28,7 @@ class OpenCLDevice; #include "COM_Device.h" #include "OCL_opencl.h" #include "COM_WorkScheduler.h" +#include "COM_ReadBufferOperation.h" /** * @brief device representing an GPU OpenCL device. @@ -96,6 +97,7 @@ public: cl_command_queue getQueue(){ return this->m_queue; } cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader *reader); + cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, ReadBufferOperation *reader); void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel, int offsetIndex, MemoryBuffer *memoryBuffers); void COM_clAttachOutputMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, cl_mem clOutputMemoryBuffer); void COM_clAttachSizeToKernelParameter(cl_kernel kernel, int offsetIndex, NodeOperation* operation); diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index 717b6ce76cc..a58f77386ea 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -94,7 +94,7 @@ void CompositorOperation::deinitExecution() } -void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers) +void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber) { float color[8]; // 7 is enough float *buffer = this->m_outputBuffer; @@ -111,9 +111,9 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber, Mem for (y = y1; y < y2 && (!breaked); y++) { for (x = x1; x < x2 && (!breaked); x++) { - this->m_imageInput->read(color, x, y, COM_PS_NEAREST, memoryBuffers); + this->m_imageInput->read(color, x, y, COM_PS_NEAREST, NULL); if (this->m_alphaInput != NULL) { - this->m_alphaInput->read(&(color[3]), x, y, COM_PS_NEAREST, memoryBuffers); + this->m_alphaInput->read(&(color[3]), x, y, COM_PS_NEAREST, NULL); } copy_v4_v4(buffer + offset, color); offset += COM_NUMBER_OF_CHANNELS; diff --git a/source/blender/compositor/operations/COM_CompositorOperation.h b/source/blender/compositor/operations/COM_CompositorOperation.h index 2719d376339..23d34abbfff 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.h +++ b/source/blender/compositor/operations/COM_CompositorOperation.h @@ -52,7 +52,7 @@ private: SocketReader *m_alphaInput; public: CompositorOperation(); - void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers); + void executeRegion(rcti *rect, unsigned int tileNumber); void setRenderData(const RenderData *rd) { this->m_rd = rd; } bool isOutputOperation(bool rendering) const { return true; } void initExecution(); diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp index 087e7a15e39..079c6ff33ec 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp @@ -59,7 +59,7 @@ static float *init_buffer(unsigned int width, unsigned int height, DataType data return NULL; } -static void write_buffer_rect(rcti *rect, MemoryBuffer **memoryBuffers, const bNodeTree *tree, +static void write_buffer_rect(rcti *rect, const bNodeTree *tree, SocketReader *reader, float *buffer, unsigned int width, DataType datatype) { float color[4]; @@ -77,7 +77,7 @@ static void write_buffer_rect(rcti *rect, MemoryBuffer **memoryBuffers, const bN for (y = y1; y < y2 && (!breaked); y++) { for (x = x1; x < x2 && (!breaked); x++) { - reader->read(color, x, y, COM_PS_NEAREST, memoryBuffers); + reader->read(color, x, y, COM_PS_NEAREST, NULL); for (i = 0; i < size; ++i) buffer[offset + i] = color[i]; @@ -113,9 +113,9 @@ void OutputSingleLayerOperation::initExecution() this->m_outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->m_datatype); } -void OutputSingleLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers) +void OutputSingleLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber) { - write_buffer_rect(rect, memoryBuffers, this->m_tree, this->m_imageInput, this->m_outputBuffer, this->getWidth(), this->m_datatype); + write_buffer_rect(rect, this->m_tree, this->m_imageInput, this->m_outputBuffer, this->getWidth(), this->m_datatype); } void OutputSingleLayerOperation::deinitExecution() @@ -183,10 +183,10 @@ void OutputOpenExrMultiLayerOperation::initExecution() } } -void OutputOpenExrMultiLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers) +void OutputOpenExrMultiLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber) { for (unsigned int i = 0; i < this->m_layers.size(); ++i) { - write_buffer_rect(rect, memoryBuffers, this->m_tree, this->m_layers[i].imageInput, this->m_layers[i].outputBuffer, this->getWidth(), this->m_layers[i].datatype); + write_buffer_rect(rect, this->m_tree, this->m_layers[i].imageInput, this->m_layers[i].outputBuffer, this->getWidth(), this->m_layers[i].datatype); } } diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h index 60244a8bf72..0d6e5bfa61a 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.h +++ b/source/blender/compositor/operations/COM_OutputFileOperation.h @@ -45,7 +45,7 @@ private: public: OutputSingleLayerOperation(const RenderData *rd, const bNodeTree *tree, DataType datatype, ImageFormatData *format, const char *path); - void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers); + void executeRegion(rcti *rect, unsigned int tileNumber); bool isOutputOperation(bool rendering) const { return true; } void initExecution(); void deinitExecution(); @@ -79,7 +79,7 @@ public: void add_layer(const char *name, DataType datatype); - void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers); + void executeRegion(rcti *rect, unsigned int tileNumber); bool isOutputOperation(bool rendering) const { return true; } void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp index 55e94568688..80cb6f6801c 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.cpp +++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp @@ -79,7 +79,7 @@ void PreviewOperation::deinitExecution() this->m_input = NULL; } -void PreviewOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers) +void PreviewOperation::executeRegion(rcti *rect, unsigned int tileNumber) { int offset; float color[4]; @@ -93,7 +93,7 @@ void PreviewOperation::executeRegion(rcti *rect, unsigned int tileNumber, Memory color[1] = 0.0f; color[2] = 0.0f; color[3] = 1.0f; - this->m_input->read(color, rx, ry, COM_PS_NEAREST, memoryBuffers); + this->m_input->read(color, rx, ry, COM_PS_NEAREST, NULL); linearrgb_to_srgb_v4(color, color); F4TOCHAR4(color, this->m_outputBuffer + offset); offset += 4; diff --git a/source/blender/compositor/operations/COM_PreviewOperation.h b/source/blender/compositor/operations/COM_PreviewOperation.h index e7b8ba55ae0..7183ea64fff 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.h +++ b/source/blender/compositor/operations/COM_PreviewOperation.h @@ -44,7 +44,7 @@ public: void deinitExecution(); const CompositorPriority getRenderPriority() const; - void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers); + void executeRegion(rcti *rect, unsigned int tileNumber); void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]); void setbNode(bNode *node) { this->m_node = node; } bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp index 76e6921503e..882d302656d 100644 --- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp @@ -28,11 +28,12 @@ ReadBufferOperation::ReadBufferOperation() : NodeOperation() { this->addOutputSocket(COM_DT_COLOR); this->m_offset = 0; + this->m_buffer = NULL; } void *ReadBufferOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers) { - return getInputMemoryBuffer(memoryBuffers); + return m_buffer; } void ReadBufferOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[]) @@ -50,30 +51,17 @@ void ReadBufferOperation::determineResolution(unsigned int resolution[], unsigne } void ReadBufferOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { - if (inputBuffers) { - MemoryBuffer *inputBuffer = inputBuffers[this->m_offset]; - if (inputBuffer) { - if (sampler == COM_PS_NEAREST) { - inputBuffer->read(color, x, y); - } - else { - inputBuffer->readCubic(color, x, y); - } - } - } else { - color[0] = 0.0f; - color[1] = 0.0f; - color[2] = 0.0f; - color[3] = 0.0f; + if (sampler == COM_PS_NEAREST) { + m_buffer->read(color, x, y); + } + else { + m_buffer->readCubic(color, x, y); } } void ReadBufferOperation::executePixel(float *color, float x, float y, float dx, float dy, MemoryBuffer *inputBuffers[]) { - MemoryBuffer *inputBuffer = inputBuffers[this->m_offset]; - if (inputBuffer) { - inputBuffer->readEWA(color, x, y, dx, dy); - } + m_buffer->readEWA(color, x, y, dx, dy); } bool ReadBufferOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) @@ -93,3 +81,9 @@ void ReadBufferOperation::readResolutionFromWriteBuffer() this->setHeight(operation->getHeight()); } } + +void ReadBufferOperation::updateMemoryBuffer() +{ + this->m_buffer = this->getMemoryProxy()->getBuffer(); + +} diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h index de0c69c0ecc..32f2a631552 100644 --- a/source/blender/compositor/operations/COM_ReadBufferOperation.h +++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h @@ -30,6 +30,7 @@ class ReadBufferOperation : public NodeOperation { private: MemoryProxy *m_memoryProxy; unsigned int m_offset; + MemoryBuffer *m_buffer; public: ReadBufferOperation(); int isBufferOperation() { return true; } @@ -46,6 +47,7 @@ public: bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return memoryBuffers[this->m_offset]; } void readResolutionFromWriteBuffer(); + void updateMemoryBuffer(); }; #endif diff --git a/source/blender/compositor/operations/COM_SplitViewerOperation.cpp b/source/blender/compositor/operations/COM_SplitViewerOperation.cpp index 00f854b2ba9..6236a666260 100644 --- a/source/blender/compositor/operations/COM_SplitViewerOperation.cpp +++ b/source/blender/compositor/operations/COM_SplitViewerOperation.cpp @@ -60,7 +60,7 @@ void SplitViewerOperation::deinitExecution() } -void SplitViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers) +void SplitViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber) { float *buffer = this->m_outputBuffer; unsigned char *bufferDisplay = this->m_outputBufferDisplay; @@ -80,10 +80,10 @@ void SplitViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber, Me float srgb[4]; image1 = this->m_xSplit ? x > perc : y > perc; if (image1) { - this->m_image1Input->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers); + this->m_image1Input->read(&(buffer[offset]), x, y, COM_PS_NEAREST, NULL); } else { - this->m_image2Input->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers); + this->m_image2Input->read(&(buffer[offset]), x, y, COM_PS_NEAREST, NULL); } /// @todo: linear conversion only when scene color management is selected, also check predivide. if (this->m_doColorManagement) { diff --git a/source/blender/compositor/operations/COM_SplitViewerOperation.h b/source/blender/compositor/operations/COM_SplitViewerOperation.h index 92275606105..c759e14e1dd 100644 --- a/source/blender/compositor/operations/COM_SplitViewerOperation.h +++ b/source/blender/compositor/operations/COM_SplitViewerOperation.h @@ -35,7 +35,7 @@ private: bool m_xSplit; public: SplitViewerOperation(); - void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers); + void executeRegion(rcti *rect, unsigned int tileNumber); void initExecution(); void deinitExecution(); void setSplitPercentage(float splitPercentage) { this->m_splitPercentage = splitPercentage; } diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp index 9278ddd6ead..fdf9c49b112 100644 --- a/source/blender/compositor/operations/COM_ViewerOperation.cpp +++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp @@ -64,7 +64,7 @@ void ViewerOperation::deinitExecution() } -void ViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers) +void ViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber) { float *buffer = this->m_outputBuffer; unsigned char *bufferDisplay = this->m_outputBufferDisplay; @@ -82,9 +82,9 @@ void ViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryB for (y = y1; y < y2 && (!breaked); y++) { for (x = x1; x < x2; x++) { - this->m_imageInput->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers); + this->m_imageInput->read(&(buffer[offset]), x, y, COM_PS_NEAREST, NULL); if (this->m_alphaInput != NULL) { - this->m_alphaInput->read(alpha, x, y, COM_PS_NEAREST, memoryBuffers); + this->m_alphaInput->read(alpha, x, y, COM_PS_NEAREST, NULL); buffer[offset + 3] = alpha[0]; } /// @todo: linear conversion only when scene color management is selected, also check predivide. diff --git a/source/blender/compositor/operations/COM_ViewerOperation.h b/source/blender/compositor/operations/COM_ViewerOperation.h index fd83c3957f1..d900d8db408 100644 --- a/source/blender/compositor/operations/COM_ViewerOperation.h +++ b/source/blender/compositor/operations/COM_ViewerOperation.h @@ -34,7 +34,7 @@ private: public: ViewerOperation(); - void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers); + void executeRegion(rcti *rect, unsigned int tileNumber); void initExecution(); void deinitExecution(); }; diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp index 8decb73615b..17e51bf08f2 100644 --- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp @@ -57,13 +57,12 @@ void WriteBufferOperation::deinitExecution() this->m_memoryProxy->free(); } -void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers) +void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber) { - //MemoryBuffer *memoryBuffer = MemoryManager::getMemoryBuffer(this->getMemoryProxy(), tileNumber); MemoryBuffer *memoryBuffer = this->m_memoryProxy->getBuffer(); float *buffer = memoryBuffer->getBuffer(); if (this->m_input->isComplex()) { - void *data = this->m_input->initializeTileData(rect, memoryBuffers); + void *data = this->m_input->initializeTileData(rect, NULL); int x1 = rect->xmin; int y1 = rect->ymin; int x2 = rect->xmax; @@ -74,7 +73,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber, Me for (y = y1; y < y2 && (!breaked); y++) { int offset4 = (y * memoryBuffer->getWidth() + x1) * COM_NUMBER_OF_CHANNELS; for (x = x1; x < x2; x++) { - this->m_input->read(&(buffer[offset4]), x, y, memoryBuffers, data); + this->m_input->read(&(buffer[offset4]), x, y, NULL, data); offset4 += COM_NUMBER_OF_CHANNELS; } @@ -84,7 +83,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber, Me } if (data) { - this->m_input->deinitializeTileData(rect, memoryBuffers, data); + this->m_input->deinitializeTileData(rect, NULL, data); data = NULL; } } @@ -100,7 +99,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber, Me for (y = y1; y < y2 && (!breaked); y++) { int offset4 = (y * memoryBuffer->getWidth() + x1) * COM_NUMBER_OF_CHANNELS; for (x = x1; x < x2; x++) { - this->m_input->read(&(buffer[offset4]), x, y, COM_PS_NEAREST, memoryBuffers); + this->m_input->read(&(buffer[offset4]), x, y, COM_PS_NEAREST, NULL); offset4 += COM_NUMBER_OF_CHANNELS; } if (isBreaked()) { diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.h b/source/blender/compositor/operations/COM_WriteBufferOperation.h index d77814a9dc4..0e0dc279c2c 100644 --- a/source/blender/compositor/operations/COM_WriteBufferOperation.h +++ b/source/blender/compositor/operations/COM_WriteBufferOperation.h @@ -41,7 +41,7 @@ public: void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]); const bool isWriteBufferOperation() const { return true; } - void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers); + void executeRegion(rcti *rect, unsigned int tileNumber); void initExecution(); void deinitExecution(); void executeOpenCLRegion(OpenCLDevice* device, rcti *rect, unsigned int chunkNumber, MemoryBuffer **memoryBuffers, MemoryBuffer *outputBuffer); |