nir: call nir_metadata_preserve at nir_remove_unused_io_vars
Without it we got a metadata assert: deqp-vk: ../src/compiler/nir/nir_metadata.c:108: nir_metadata_check_validation_flag: Assertion `!(function->impl->valid_metadata & nir_metadata_not_properly_reset)' failed if we try to use NIR_PASS(_, instead of NIR_PASS_V (that among other things, do more validations). Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609>
This commit is contained in:

committed by
Marge Bot

parent
d8fee4cdaa
commit
8d3ce4eb06
@@ -172,8 +172,14 @@ nir_remove_unused_io_vars(nir_shader *shader,
|
||||
}
|
||||
}
|
||||
|
||||
if (progress)
|
||||
nir_function_impl *impl = nir_shader_get_entrypoint(shader);
|
||||
if (progress) {
|
||||
nir_metadata_preserve(impl, nir_metadata_dominance |
|
||||
nir_metadata_block_index);
|
||||
nir_fixup_deref_modes(shader);
|
||||
} else {
|
||||
nir_metadata_preserve(impl, nir_metadata_all);
|
||||
}
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
Reference in New Issue
Block a user