Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/integrator/state_util.h
| Show First 20 Lines • Show All 320 Lines • ▼ Show 20 Lines | ccl_device_inline void integrator_shadow_state_move(KernelGlobals kg, | ||||
| INTEGRATOR_STATE_WRITE(state, shadow_path, queued_kernel) = 0; | INTEGRATOR_STATE_WRITE(state, shadow_path, queued_kernel) = 0; | ||||
| } | } | ||||
| #endif | #endif | ||||
| /* NOTE: Leaves kernel scheduling information untouched. Use INIT semantic for one of the paths | /* NOTE: Leaves kernel scheduling information untouched. Use INIT semantic for one of the paths | ||||
| * after this function. */ | * after this function. */ | ||||
| ccl_device_inline void integrator_state_shadow_catcher_split(KernelGlobals kg, | ccl_device_inline IntegratorState integrator_state_shadow_catcher_split(KernelGlobals kg, | ||||
| IntegratorState state) | IntegratorState state) | ||||
| { | { | ||||
| #if defined(__KERNEL_GPU__) | #if defined(__KERNEL_GPU__) | ||||
| ConstIntegratorState to_state = atomic_fetch_and_add_uint32( | ConstIntegratorState to_state = atomic_fetch_and_add_uint32( | ||||
| &kernel_integrator_state.next_main_path_index[0], 1); | &kernel_integrator_state.next_main_path_index[0], 1); | ||||
| integrator_state_copy_only(kg, to_state, state); | integrator_state_copy_only(kg, to_state, state); | ||||
| #else | #else | ||||
| IntegratorStateCPU *ccl_restrict to_state = state + 1; | IntegratorStateCPU *ccl_restrict to_state = state + 1; | ||||
| /* Only copy the required subset, since shadow intersections are big and irrelevant here. */ | /* Only copy the required subset for performance. */ | ||||
| to_state->path = state->path; | to_state->path = state->path; | ||||
| to_state->ray = state->ray; | to_state->ray = state->ray; | ||||
| to_state->isect = state->isect; | to_state->isect = state->isect; | ||||
| integrator_state_copy_volume_stack(kg, to_state, state); | integrator_state_copy_volume_stack(kg, to_state, state); | ||||
| #endif | #endif | ||||
| INTEGRATOR_STATE_WRITE(to_state, path, flag) |= PATH_RAY_SHADOW_CATCHER_PASS; | return to_state; | ||||
| } | } | ||||
| #ifdef __KERNEL_CPU__ | #ifdef __KERNEL_CPU__ | ||||
| ccl_device_inline int integrator_state_bounce(ConstIntegratorState state, const int) | ccl_device_inline int integrator_state_bounce(ConstIntegratorState state, const int) | ||||
| { | { | ||||
| return INTEGRATOR_STATE(state, path, bounce); | return INTEGRATOR_STATE(state, path, bounce); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines | |||||