Blender Git Commit Log
Git Commits -> Revision c6275da
Revision c6275da by Sergey Sharybin (master) October 6, 2021, 13:46 (GMT) |
Fix T91922: Cycles artifacts with high volume nested level Make volume stack allocated conditionally, potentially based on the actual nested level of objects in the scene. Currently the nested level is estimated by number of volume objects. This is a non-expensive check which is probably enough in practice to get almost perfect memory usage and performance. The conditional allocation is a bit tricky. For the CPU we declare and define maximum possible volume stack, because there are only that many integrator states on the CPU. On the GPU we declare outer SoA to have all volume stack elements, but only allocate actually needed ones. The actually used volume stack size is passed as a pre-processor, which seems to be easiest and fastest for the GPU state copy. There seems to be no speed regression in the demo files on RTX6000. Note that scenes with high nested level of volume will now be slower but correct. Differential Revision: https://developer.blender.org/D12759 |
Commit Details:
Full Hash: c6275da852eab77e2cea1ae601a43a2dbaad6c27
Parent Commit: e41dddd
Lines Changed: +112, -23
12 Modified Paths:
/intern/cycles/integrator/path_trace_work_gpu.cpp (+16, -2) (Diff)
/intern/cycles/kernel/integrator/integrator_intersect_volume_stack.h (+17, -10) (Diff)
/intern/cycles/kernel/integrator/integrator_state.h (+4, -2) (Diff)
/intern/cycles/kernel/integrator/integrator_state_template.h (+5, -3) (Diff)
/intern/cycles/kernel/integrator/integrator_state_util.h (+4, -1) (Diff)
/intern/cycles/kernel/integrator/integrator_volume_stack.h (+1, -1) (Diff)
/intern/cycles/kernel/kernel_types.h (+7, -3) (Diff)
/intern/cycles/render/graph.cpp (+3, -1) (Diff)
/intern/cycles/render/object.cpp (+16, -0) (Diff)
/intern/cycles/render/object.h (+7, -0) (Diff)
/intern/cycles/render/scene.cpp (+29, -0) (Diff)
/intern/cycles/render/scene.h (+3, -0) (Diff)
/intern/cycles/kernel/integrator/integrator_intersect_volume_stack.h (+17, -10) (Diff)
/intern/cycles/kernel/integrator/integrator_state.h (+4, -2) (Diff)
/intern/cycles/kernel/integrator/integrator_state_template.h (+5, -3) (Diff)
/intern/cycles/kernel/integrator/integrator_state_util.h (+4, -1) (Diff)
/intern/cycles/kernel/integrator/integrator_volume_stack.h (+1, -1) (Diff)
/intern/cycles/kernel/kernel_types.h (+7, -3) (Diff)
/intern/cycles/render/graph.cpp (+3, -1) (Diff)
/intern/cycles/render/object.cpp (+16, -0) (Diff)
/intern/cycles/render/object.h (+7, -0) (Diff)
/intern/cycles/render/scene.cpp (+29, -0) (Diff)
/intern/cycles/render/scene.h (+3, -0) (Diff)