mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 21:30:09 +01:00
nir_to_tgsi: Do the required cleanup for nir_opt_find_array_copies().
If we made a copy deref, then we need to do dead-write elimination for the pervious writes or we'll just emit the same copy deref again next time around. And, at the end of the opt loop, we need to lower copy derefs because later passes (locals_to_regs, notably) depend on it. Fixes infinite opt loop on fs-function-inout-array with virgl on NTT. Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15899>
This commit is contained in:
parent
c8df09ebd4
commit
5fad6bca72
1 changed files with 5 additions and 1 deletions
|
|
@ -3153,6 +3153,9 @@ ntt_optimize_nir(struct nir_shader *s, struct pipe_screen *screen)
|
|||
NIR_PASS(progress, s, nir_opt_dead_cf);
|
||||
NIR_PASS(progress, s, nir_opt_cse);
|
||||
NIR_PASS(progress, s, nir_opt_find_array_copies);
|
||||
NIR_PASS(progress, s, nir_opt_copy_prop_vars);
|
||||
NIR_PASS(progress, s, nir_opt_dead_write_vars);
|
||||
|
||||
NIR_PASS(progress, s, nir_opt_if, true);
|
||||
NIR_PASS(progress, s, nir_opt_peephole_select,
|
||||
control_flow_depth == 0 ? ~0 : 8, true, true);
|
||||
|
|
@ -3185,8 +3188,9 @@ ntt_optimize_nir(struct nir_shader *s, struct pipe_screen *screen)
|
|||
.buffer_max = 0,
|
||||
};
|
||||
NIR_PASS(progress, s, nir_opt_offsets, &offset_options);
|
||||
|
||||
} while (progress);
|
||||
|
||||
NIR_PASS_V(s, nir_lower_var_copies);
|
||||
}
|
||||
|
||||
/* Scalarizes all 64-bit ALU ops. Note that we only actually need to
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue