diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-08-23 13:32:48 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-08-23 13:35:23 +0300 |
commit | 5c60721c9e3d5af2bd4f80b3013fe0c804cf7531 (patch) | |
tree | 12efb85c5ede0e0fe00e5bf48a7b1cc65265d90f /intern | |
parent | b9513706cb57290f5b7ecf085d933c832d622fa7 (diff) |
Fix T51805: Overlapping volumes renders incorrect on AMD GPU
We need to make sure we can store all volume closures for all objects in volume
stack. This is a bit tricky to detect what would be the "nestness" level of
volumes so for now use maximum possible stack depth. Might cause some slowdown,
but better to give reliable render output than to fail quickly.
Should be safe for 2.79 after extra eyes.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/graph.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index 41e7e0205b0..08203163d1a 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -1018,6 +1018,9 @@ int ShaderGraph::get_num_closures() else if(CLOSURE_IS_PRINCIPLED(closure_type)) { num_closures += 8; } + else if(CLOSURE_IS_VOLUME(closure_type)) { + num_closures += VOLUME_STACK_SIZE; + } else { ++num_closures; } |