mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
lima: fix metadata in lima_nir_split_loads
Reviewed-by: Erico Nunes <nunes.erico@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36308>
This commit is contained in:
parent
b8d48ffcac
commit
a076d3f3ac
1 changed files with 5 additions and 2 deletions
|
|
@ -115,16 +115,19 @@ lima_nir_split_loads(nir_shader *shader)
|
|||
nir_foreach_function_impl(impl, shader) {
|
||||
nir_builder b = nir_builder_create(impl);
|
||||
|
||||
bool impl_progress = false;
|
||||
nir_foreach_block_reverse(block, impl) {
|
||||
nir_foreach_instr_reverse_safe(instr, block) {
|
||||
if (instr->type == nir_instr_type_load_const) {
|
||||
replace_load_const(&b, nir_instr_as_load_const(instr));
|
||||
progress = true;
|
||||
impl_progress = true;
|
||||
} else if (instr->type == nir_instr_type_intrinsic) {
|
||||
progress |= replace_intrinsic(&b, nir_instr_as_intrinsic(instr));
|
||||
impl_progress |= replace_intrinsic(&b, nir_instr_as_intrinsic(instr));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
progress |= nir_progress(impl_progress, impl, nir_metadata_control_flow);
|
||||
}
|
||||
|
||||
return progress;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue