Skip to content

nir: Add a discard optimization pass

Pierre-Eric Pelloux-Prayer requested to merge pepp/mesa:nir-move-discards into main

This is a rebased version of !2339 with the Intel change dropped and radeonsi code added.

No piglit/deqp regression.

shaderdb:

Master vs MR Shaders SGPRs VGPRs SpillSGPR CodeSize MaxWaves
All affected 2082 1.92 % -2.67 % -100.00 % 0.13 % 2.43 %
Total 54433 0.08 % -0.11 % -0.23 % . 0.09 %

with glsl_correct_derivatives_after_discard=true:

Master vs MR Shaders SGPRs VGPRs SpillSGPR CodeSize MaxWaves
All affected 5510 -1.63 % -1.04 % -9.67 % 0.10 % 0.96 %
Total 54433 -0.19 % -0.12 % -1.75 % 0.01 % 0.09 %
Edited by Pierre-Eric Pelloux-Prayer

Merge request reports