The motivation for this is twofold. We want to see if this improves performance,
and we want to use it to bring back transparency handling for the ambient
occlusion pass, which should be relatively simple with this.
- 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.
Shadow path compaction may help here also, but that is for another revision.
Depends on D12888
