intel/nir: add a pass to shrink const block loads
The NIR helpers for ray tracing sometimes load more than necessary. This simple optimization trims the loads to what is needed.
Some numbers out of shader-db on Q2RTX :
Instructions in all programs: 85137 -> 84366 (-0.9%)
SENDs in all programs: 3438 -> 3452 (+0.4%)
Loops in all programs: 40 -> 40 (+0.0%)
Cycles in all programs: 2462650 -> 2415668 (-1.9%)
Spills in all programs: 401 -> 368 (-8.2%)
Fills in all programs: 693 -> 625 (-9.8%)
Signed-off-by: Lionel Landwerlin lionel.g.landwerlin@intel.com