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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user