Blender Git Commit Log
Git Commits -> Revision 943e73b
Revision 943e73b by Brecht Van Lommel (master) October 19, 2021, 13:09 (GMT) |
Cycles: decouple shadow paths from main path on GPU The motivation for this is twofold. It improves performance (5-10% on most benchmark scenes), and will help to bring back transparency support for the ambient occlusion pass. * Duplicate some members from the main path state in the shadow path state. * Add shadow paths incrementally to the array similar to what we do for the shadow catchers. * For the scheduling, allow running shade surface and shade volume kernels as long as there is enough space in the shadow paths array. If not, execute shadow kernels until it is empty. * Add IntegratorShadowState and ConstIntegratorShadowState typedefs that can be different between CPU and GPU. For GPU both main and shadow paths juse have an integer for SoA access. Bt with CPU it's a different pointer type so we get type safety checks in code shared between CPU and GPU. * For CPU, add a separate IntegratorShadowStateCPU struct embedded in IntegratorShadowState. * Update various functions to take the shadow state, and make SVM take either type of state using templates. Differential Revision: https://developer.blender.org/D12889 |
Commit Details:
Full Hash: 943e73b07e26d64c04ccb7d8f656e3818a57cca0
Parent Commit: 6e473a8
Lines Changed: +550, -277
1 Added Path:
/intern/cycles/kernel/integrator/integrator_shadow_state_template.h (+83, -0) (View)
29 Modified Paths:
/intern/cycles/integrator/path_trace_work_gpu.cpp (+85, -28) (Diff)
/intern/cycles/integrator/path_trace_work_gpu.h (+7, -0) (Diff)
/intern/cycles/kernel/CMakeLists.txt (+1, -0) (Diff)
/intern/cycles/kernel/device/cpu/kernel_arch_impl.h (+25, -11) (Diff)
/intern/cycles/kernel/device/gpu/kernel.h (+3, -7) (Diff)
/intern/cycles/kernel/integrator/integrator_intersect_closest.h (+0, -7) (Diff)
/intern/cycles/kernel/integrator/integrator_intersect_shadow.h (+5, -5) (Diff)
/intern/cycles/kernel/integrator/integrator_megakernel.h (+7, -4) (Diff)
/intern/cycles/kernel/integrator/integrator_shade_shadow.h (+5, -5) (Diff)
/intern/cycles/kernel/integrator/integrator_shade_surface.h (+27, -12) (Diff)
/intern/cycles/kernel/integrator/integrator_shade_volume.h (+29, -14) (Diff)
/intern/cycles/kernel/integrator/integrator_state.h (+33, -1) (Diff)
/intern/cycles/kernel/integrator/integrator_state_flow.h (+7, -4) (Diff)
/intern/cycles/kernel/integrator/integrator_state_template.h (+2, -56) (Diff)
/intern/cycles/kernel/integrator/integrator_state_util.h (+106, -15) (Diff)
/intern/cycles/kernel/integrator/integrator_volume_stack.h (+2, -4) (Diff)
/intern/cycles/kernel/kernel_accumulate.h (+6, -3) (Diff)
/intern/cycles/kernel/kernel_path_state.h (+8, -7) (Diff)
/intern/cycles/kernel/kernel_shader.h (+6, -5) (Diff)
/intern/cycles/kernel/kernel_shadow_catcher.h (+1, -1) (Diff)
/intern/cycles/kernel/kernel_types.h (+1, -0) (Diff)
/intern/cycles/kernel/osl/osl_services.cpp (+43, -26) (Diff)
/intern/cycles/kernel/osl/osl_shader.cpp (+11, -8) (Diff)
/intern/cycles/kernel/osl/osl_shader.h (+4, -6) (Diff)
/intern/cycles/kernel/svm/svm.h (+2, -2) (Diff)
/intern/cycles/kernel/svm/svm_ao.h (+11, -11) (Diff)
/intern/cycles/kernel/svm/svm_aov.h (+4, -4) (Diff)
/intern/cycles/kernel/svm/svm_bevel.h (+9, -9) (Diff)
/intern/cycles/kernel/svm/svm_light_path.h (+17, -22) (Diff)
/intern/cycles/integrator/path_trace_work_gpu.h (+7, -0) (Diff)
/intern/cycles/kernel/CMakeLists.txt (+1, -0) (Diff)
/intern/cycles/kernel/device/cpu/kernel_arch_impl.h (+25, -11) (Diff)
/intern/cycles/kernel/device/gpu/kernel.h (+3, -7) (Diff)
/intern/cycles/kernel/integrator/integrator_intersect_closest.h (+0, -7) (Diff)
/intern/cycles/kernel/integrator/integrator_intersect_shadow.h (+5, -5) (Diff)
/intern/cycles/kernel/integrator/integrator_megakernel.h (+7, -4) (Diff)
/intern/cycles/kernel/integrator/integrator_shade_shadow.h (+5, -5) (Diff)
/intern/cycles/kernel/integrator/integrator_shade_surface.h (+27, -12) (Diff)
/intern/cycles/kernel/integrator/integrator_shade_volume.h (+29, -14) (Diff)
/intern/cycles/kernel/integrator/integrator_state.h (+33, -1) (Diff)
/intern/cycles/kernel/integrator/integrator_state_flow.h (+7, -4) (Diff)
/intern/cycles/kernel/integrator/integrator_state_template.h (+2, -56) (Diff)
/intern/cycles/kernel/integrator/integrator_state_util.h (+106, -15) (Diff)
/intern/cycles/kernel/integrator/integrator_volume_stack.h (+2, -4) (Diff)
/intern/cycles/kernel/kernel_accumulate.h (+6, -3) (Diff)
/intern/cycles/kernel/kernel_path_state.h (+8, -7) (Diff)
/intern/cycles/kernel/kernel_shader.h (+6, -5) (Diff)
/intern/cycles/kernel/kernel_shadow_catcher.h (+1, -1) (Diff)
/intern/cycles/kernel/kernel_types.h (+1, -0) (Diff)
/intern/cycles/kernel/osl/osl_services.cpp (+43, -26) (Diff)
/intern/cycles/kernel/osl/osl_shader.cpp (+11, -8) (Diff)
/intern/cycles/kernel/osl/osl_shader.h (+4, -6) (Diff)
/intern/cycles/kernel/svm/svm.h (+2, -2) (Diff)
/intern/cycles/kernel/svm/svm_ao.h (+11, -11) (Diff)
/intern/cycles/kernel/svm/svm_aov.h (+4, -4) (Diff)
/intern/cycles/kernel/svm/svm_bevel.h (+9, -9) (Diff)
/intern/cycles/kernel/svm/svm_light_path.h (+17, -22) (Diff)