mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
radv: don't use radv_optimize_nir after lowering indirect derefs for RT
Just these three passes seem necessary. radv_rt_nir_to_asm() will call radv_optimize_nir() later. fossil-db (navi21): Totals from 32 (0.02% of 202427) affected shaders: Instrs: 205974 -> 205948 (-0.01%) CodeSize: 1131492 -> 1131352 (-0.01%) SpillSGPRs: 321 -> 320 (-0.31%) Latency: 2171106 -> 2170677 (-0.02%); split: -0.02%, +0.00% InvThroughput: 540282 -> 540174 (-0.02%) VClause: 5579 -> 5578 (-0.02%) SClause: 4586 -> 4582 (-0.09%) Copies: 23543 -> 23535 (-0.03%) PreSGPRs: 2444 -> 2443 (-0.04%) VALU: 129415 -> 129399 (-0.01%) SMEM: 7175 -> 7170 (-0.07%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31265>
This commit is contained in:
parent
91d555c2cb
commit
f9f60aa844
1 changed files with 2 additions and 4 deletions
|
|
@ -657,11 +657,9 @@ radv_rt_spirv_to_nir(const struct radv_compiler_info *compiler_info, struct radv
|
|||
{
|
||||
stage->nir = radv_shader_spirv_to_nir(compiler_info, stage, NULL, false);
|
||||
|
||||
bool indirect_derefs_lowered = false;
|
||||
NIR_PASS(indirect_derefs_lowered, stage->nir, ac_nir_lower_indirect_derefs);
|
||||
NIR_PASS(_, stage->nir, ac_nir_lower_indirect_derefs);
|
||||
NIR_PASS(_, stage->nir, nir_lower_vars_to_ssa);
|
||||
if (indirect_derefs_lowered && !stage->key.optimisations_disabled)
|
||||
radv_optimize_nir(stage->nir, false);
|
||||
NIR_PASS(_, stage->nir, nir_remove_dead_variables, nir_var_function_temp, NULL);
|
||||
|
||||
nir_foreach_variable_with_modes (var, stage->nir, nir_var_ray_hit_attrib) {
|
||||
unsigned size, alignment;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue