Page MenuHome

Cycles X: refactoring of kernel globals
ClosedPublic

Authored by Brecht Van Lommel (brecht) on May 6 2021, 9:22 PM.

Details

Summary
  • Declare kernel globals and associated macros in one place
  • Add IntegratorStateGPU for CPU host to access
  • Reduce code duplication between CUDA and OptiX
  • Make shader sort key part of integrator state template
  • Remove unused CPU kernel globals
  • Prepare for copying/moving states
  • Rename integrator_path_state.h to integrator_state_flow.h, to avoid confusion with kernel_path_state.h.

This includes some changes from D11172 and will cause merge conflicts.
I can wait with merging if that helps.

Event Timeline

Brecht Van Lommel (brecht) requested review of this revision.May 6 2021, 9:22 PM
Brecht Van Lommel (brecht) created this revision.

I can wait with merging if that helps.

No, please go ahead, I can deal with the conflicts (and do need to do some module work, so not sure I can be committing the shadow catcher today, and your patch is almost there!)

I do get the

/home/sergey/Developer/blender/build/cmake-release/bin/3.0/scripts/addons/cycles/source/kernel/device/cuda/kernel.cu(277): warning: integer conversion resulted in a change of sign

/home/sergey/Developer/blender/build/cmake-release/bin/3.0/scripts/addons/cycles/source/kernel/device/cuda/parallel_sorted_index.h(41): warning: integer conversion resulted in a change of sign
          detected during instantiation of "void cuda_parallel_sorted_index_array<blocksize,GetKeyOp>(uint, int *, int *, int *, GetKeyOp) [with blocksize=512U, GetKeyOp=lambda [](int)->unsigned int]" 
/home/sergey/Developer/blender/build/cmake-release/bin/3.0/scripts/addons/cycles/source/kernel/device/cuda/kernel.cu(273): here

warning with this change. Is it as simple as changing int to uint somewhere?

This revision is now accepted and ready to land.May 7 2021, 3:07 PM