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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-08-23 13:32:48 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-09-04 13:56:08 +0300
commit6825439b363bfe744b61e1ed6b79490adc38501e (patch)
treea8eb2f45d94827e6d8d842dc020d99ebc8afca11
parentf2aa9bec9d752c3cd0db15485330857c8b63179c (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.
-rw-r--r--intern/cycles/render/graph.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp
index 2d810ff664f..470f7d0cfec 100644
--- a/intern/cycles/render/graph.cpp
+++ b/intern/cycles/render/graph.cpp
@@ -1040,6 +1040,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;
}