radv/gfx10+: remove null exports if discard isn't used

Foz-DB Navi31:
Totals from 1362 (1.71% of 79789) affected shaders:
Instrs: 9879 -> 8497 (-13.99%)
CodeSize: 52004 -> 41028 (-21.11%)
Latency: 48821 -> 27349 (-43.98%)
InvThroughput: 7475 -> 7474 (-0.01%)
SALU: 274 -> 254 (-7.30%)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33835>
This commit is contained in:
Georg Lehmann 2025-03-02 12:14:26 +01:00 committed by Marge Bot
parent 09ff1c28d8
commit 55921bd7ef

View file

@ -449,7 +449,8 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_graphics_stat
G_0286CC_PERSP_CENTROID_ENA(stage->info.ps.spi_ps_input_ena),
.bc_optimize_for_linear = G_0286CC_LINEAR_CENTER_ENA(stage->info.ps.spi_ps_input_ena) &&
G_0286CC_LINEAR_CENTROID_ENA(stage->info.ps.spi_ps_input_ena),
.uses_discard = true,
.uses_discard = stage->info.ps.can_discard,
.dcc_decompress_gfx11 = gfx_state->dcc_decompress_gfx11,
.no_color_export = stage->info.ps.has_epilog,
.no_depth_export = stage->info.ps.exports_mrtz_via_epilog,