From 55921bd7ef5e4e5034dfa4637d9d8c026cd027e4 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Sun, 2 Mar 2025 12:14:26 +0100 Subject: [PATCH] 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 Part-of: --- src/amd/vulkan/radv_pipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 795b5de2a5a..0b9f4203c90 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -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,