nir,radv: Make moving rt intrinsics to the top of the shader common for ANV/RADV, and add optimization [v2]

Open Sviatoslav Peleshko requested to merge GL/mesa:fix_nir_move_rt_up into main

This additional pass fixes cases like when gl_WorldRayDirectionEXT is used after traceRayEXT(), and loading the value that was passed to traceRayEXT() in the resume shader instead of the original one.


  • Make RADV approach from !16889 (merged) common instead of adding similar pass to ANV.
  • Add optimization to try to limit liveliness a bit.

Closes: #8979

Edited by Sviatoslav Peleshko

Merge request reports