nir/opt_sink: sink agx backfacing

helps an elden ring shader:

Totals from 1 (0.03% of 3206) affected shaders:
Instrs: 4146 -> 4141 (-0.12%)
CodeSize: 27374 -> 27334 (-0.15%)
ALU: 2554 -> 2549 (-0.20%)
FSCIB: 2554 -> 2549 (-0.20%)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35559>
This commit is contained in:
Alyssa Rosenzweig 2025-06-13 16:24:27 -04:00 committed by Marge Bot
parent 3eeba6efdd
commit b0f8c22682

View file

@ -126,6 +126,7 @@ can_sink_instr(nir_instr *instr, nir_move_options options, bool *can_mov_out_of_
return options & nir_move_copies;
case nir_intrinsic_load_constant_agx:
case nir_intrinsic_load_local_pixel_agx:
case nir_intrinsic_load_back_face_agx:
case nir_intrinsic_load_shader_output_pan:
return true;
default: