diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-06-09 12:10:21 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-06-09 12:21:23 +0300 |
commit | b18a214ecba602f8d06ec40ee03111308c9afbd7 (patch) | |
tree | 8a57a6f11af34a3206128bfeb368b5d98085e9b2 /source/blender/compositor/operations | |
parent | d7c812f15befb161d47451afdeba9d070a7d81a7 (diff) |
Fix: Compositor test desintegrate failing on arm64
Changes introduced in commit rBe9f2f17e8518
can create different render results when there is
a Math or Mix operation after TextureOperation
on tiled execution model.
This is due to WriteBufferOperation forcing a single pixel
resolution when these operations use a preferred
resolution of 0 to check if their inputs have resolution.
Fixing this behaviour creates different renders too.
This patch keeps previous tiled implementation and
adds the new implementation only for full frame execution.
Reviewed By: Jeroen Bakker (jbakker)
Differential Revision: https://developer.blender.org/D11546
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_TextureOperation.cc | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cc b/source/blender/compositor/operations/COM_TextureOperation.cc index 7517ff8a137..059a289ae4d 100644 --- a/source/blender/compositor/operations/COM_TextureOperation.cc +++ b/source/blender/compositor/operations/COM_TextureOperation.cc @@ -75,13 +75,32 @@ void TextureBaseOperation::deinitExecution() void TextureBaseOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) { - /* Determine inputs resolutions. */ - unsigned int temp[2]; - NodeOperation::determineResolution(temp, preferredResolution); - - /* We don't use inputs resolutions because they are only used as parameters, not image data. */ - resolution[0] = preferredResolution[0]; - resolution[1] = preferredResolution[1]; + switch (execution_model_) { + case eExecutionModel::Tiled: { + if (preferredResolution[0] == 0 || preferredResolution[1] == 0) { + int width = this->m_rd->xsch * this->m_rd->size / 100; + int height = this->m_rd->ysch * this->m_rd->size / 100; + resolution[0] = width; + resolution[1] = height; + } + else { + resolution[0] = preferredResolution[0]; + resolution[1] = preferredResolution[1]; + } + break; + } + case eExecutionModel::FullFrame: { + /* Determine inputs resolutions. */ + unsigned int temp[2]; + NodeOperation::determineResolution(temp, preferredResolution); + + /* We don't use inputs resolutions because they are only used as parameters, not image data. + */ + resolution[0] = preferredResolution[0]; + resolution[1] = preferredResolution[1]; + break; + } + } } void TextureAlphaOperation::executePixelSampled(float output[4], |