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:
authorManuel Castilla <manzanillawork@gmail.com>2021-07-06 00:32:19 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-07-06 00:36:43 +0300
commitcf17f7e0cc6efb6f14a271e37d2ea1b3f10bb66d (patch)
tree584ea3a7f36a901dc359078da0dbbf2ade404082 /source/blender/compositor/intern/COM_BufferOperation.cc
parent3d9ecf1cf26e5b55f1d961c9068e20c63d5c03b0 (diff)
Fix T89671: Crash when using Denoise node on Full Frame mode
Tiled fallback doesn't support single element buffers. Ensure tiles are initialized as full buffers.
Diffstat (limited to 'source/blender/compositor/intern/COM_BufferOperation.cc')
-rw-r--r--source/blender/compositor/intern/COM_BufferOperation.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/compositor/intern/COM_BufferOperation.cc b/source/blender/compositor/intern/COM_BufferOperation.cc
index 8464d01801f..c07a6f01451 100644
--- a/source/blender/compositor/intern/COM_BufferOperation.cc
+++ b/source/blender/compositor/intern/COM_BufferOperation.cc
@@ -23,6 +23,7 @@ namespace blender::compositor {
BufferOperation::BufferOperation(MemoryBuffer *buffer, DataType data_type)
{
buffer_ = buffer;
+ inflated_buffer_ = nullptr;
/* TODO: Implement a MemoryBuffer get_size() method returning a Size2d type. Shorten following
* code to: set_resolution(buffer.get_size()) */
unsigned int resolution[2];
@@ -34,7 +35,19 @@ BufferOperation::BufferOperation(MemoryBuffer *buffer, DataType data_type)
void *BufferOperation::initializeTileData(rcti * /*rect*/)
{
- return buffer_;
+ if (buffer_->is_a_single_elem() == false) {
+ return buffer_;
+ }
+
+ if (!inflated_buffer_) {
+ inflated_buffer_ = buffer_->inflate();
+ }
+ return inflated_buffer_;
+}
+
+void BufferOperation::deinitExecution()
+{
+ delete inflated_buffer_;
}
void BufferOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)