radv: use ac_nir_opt_pack_half

Foz-DB Navi21:
Totals from 20425 (25.73% of 79395) affected shaders:
MaxWaves: 525608 -> 525690 (+0.02%); split: +0.02%, -0.00%
Instrs: 13570442 -> 13531690 (-0.29%); split: -0.29%, +0.00%
CodeSize: 74246928 -> 74312000 (+0.09%); split: -0.03%, +0.12%
VGPRs: 814736 -> 813384 (-0.17%); split: -0.18%, +0.02%
Latency: 103675193 -> 103574328 (-0.10%); split: -0.12%, +0.02%
InvThroughput: 25189130 -> 25114931 (-0.29%); split: -0.30%, +0.00%
VClause: 314579 -> 314573 (-0.00%); split: -0.00%, +0.00%
SClause: 526551 -> 526548 (-0.00%); split: -0.00%, +0.00%
Copies: 772147 -> 772999 (+0.11%); split: -0.01%, +0.12%
PreVGPRs: 661914 -> 661923 (+0.00%)
VALU: 9612901 -> 9574094 (-0.40%); split: -0.40%, +0.00%
SALU: 1244130 -> 1244176 (+0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28670>
This commit is contained in:
Georg Lehmann
2023-09-03 13:37:38 +02:00
committed by Marge Bot
parent 2b346cc639
commit 2543f5a594
+8
View File
@@ -710,6 +710,14 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_graphics_stat
/* cleanup passes */
NIR_PASS(_, stage->nir, nir_lower_alu_width, opt_vectorize_callback, device);
/* This pass changes the global float control mode to RTZ, so can't be used
* with LLVM, which only supports RTNE, or RT, where the mode needs to match
* across separately compiled stages.
*/
if (!radv_use_llvm_for_stage(pdev, stage->stage) && !gl_shader_stage_is_rt(stage->stage))
NIR_PASS(_, stage->nir, ac_nir_opt_pack_half, gfx_level);
NIR_PASS(_, stage->nir, nir_lower_load_const_to_scalar);
NIR_PASS(_, stage->nir, nir_copy_prop);
NIR_PASS(_, stage->nir, nir_opt_dce);