Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/integrator/integrator_state_util.h
| Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
| #ifdef __EMBREE__ | #ifdef __EMBREE__ | ||||
| isect->Ng = INTEGRATOR_STATE_ARRAY(shadow_isect, index, Ng); | isect->Ng = INTEGRATOR_STATE_ARRAY(shadow_isect, index, Ng); | ||||
| #endif | #endif | ||||
| } | } | ||||
| ccl_device_forceinline void integrator_state_copy_volume_stack_to_shadow(INTEGRATOR_STATE_ARGS) | ccl_device_forceinline void integrator_state_copy_volume_stack_to_shadow(INTEGRATOR_STATE_ARGS) | ||||
| { | { | ||||
| if (kernel_data.kernel_features & KERNEL_FEATURE_VOLUME) { | if (kernel_data.kernel_features & KERNEL_FEATURE_VOLUME) { | ||||
| for (int i = 0; i < INTEGRATOR_VOLUME_STACK_SIZE; i++) { | for (int i = 0; i < kernel_data.volume_stack_size; i++) { | ||||
| INTEGRATOR_STATE_ARRAY_WRITE(shadow_volume_stack, i, object) = INTEGRATOR_STATE_ARRAY( | INTEGRATOR_STATE_ARRAY_WRITE(shadow_volume_stack, i, object) = INTEGRATOR_STATE_ARRAY( | ||||
| volume_stack, i, object); | volume_stack, i, object); | ||||
| INTEGRATOR_STATE_ARRAY_WRITE(shadow_volume_stack, i, shader) = INTEGRATOR_STATE_ARRAY( | INTEGRATOR_STATE_ARRAY_WRITE(shadow_volume_stack, i, shader) = INTEGRATOR_STATE_ARRAY( | ||||
| volume_stack, i, shader); | volume_stack, i, shader); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | while (false) \ | ||||
| ; | ; | ||||
| # define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size) \ | # define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size) \ | ||||
| ++index; \ | ++index; \ | ||||
| } \ | } \ | ||||
| while (index < gpu_array_size) \ | while (index < gpu_array_size) \ | ||||
| ; | ; | ||||
| # define KERNEL_STRUCT_VOLUME_STACK_SIZE kernel_data.volume_stack_size | |||||
| # include "kernel/integrator/integrator_state_template.h" | # include "kernel/integrator/integrator_state_template.h" | ||||
| # undef KERNEL_STRUCT_BEGIN | # undef KERNEL_STRUCT_BEGIN | ||||
| # undef KERNEL_STRUCT_MEMBER | # undef KERNEL_STRUCT_MEMBER | ||||
| # undef KERNEL_STRUCT_ARRAY_MEMBER | # undef KERNEL_STRUCT_ARRAY_MEMBER | ||||
| # undef KERNEL_STRUCT_END | # undef KERNEL_STRUCT_END | ||||
| # undef KERNEL_STRUCT_END_ARRAY | # undef KERNEL_STRUCT_END_ARRAY | ||||
| # undef KERNEL_STRUCT_VOLUME_STACK_SIZE | |||||
| } | } | ||||
| ccl_device_inline void integrator_state_move(const IntegratorState to_state, | ccl_device_inline void integrator_state_move(const IntegratorState to_state, | ||||
| const IntegratorState state) | const IntegratorState state) | ||||
| { | { | ||||
| integrator_state_copy_only(to_state, state); | integrator_state_copy_only(to_state, state); | ||||
| INTEGRATOR_STATE_WRITE(path, queued_kernel) = 0; | INTEGRATOR_STATE_WRITE(path, queued_kernel) = 0; | ||||
| Show All 38 Lines | |||||