Module: Mesa Branch: main Commit: ad8dd39bd35320c02d8f9be036e458aa479fffff URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad8dd39bd35320c02d8f9be036e458aa479fffff
Author: Timur Kristóf <timur.kris...@gmail.com> Date: Thu Apr 22 14:11:39 2021 +0200 aco: Fixup the NIR metadata after sanitize_cf_list. sanitize_cf_list can in fact invalidate the dominance metadata, which we need to use eg. nir_unsigned_upper_bound. Signed-off-by: Timur Kristóf <timur.kris...@gmail.com> Reviewed-by: Daniel Schürmann <dan...@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740> --- src/amd/compiler/aco_instruction_selection_setup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index fb3e2659f5a..4392c9b463a 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -590,10 +590,10 @@ void init_context(isel_context *ctx, nir_shader *shader) /* sanitize control flow */ nir_metadata_require(impl, nir_metadata_dominance); sanitize_cf_list(impl, &impl->body); - nir_metadata_preserve(impl, ~nir_metadata_block_index); + nir_metadata_preserve(impl, nir_metadata_none); - /* we'll need this for isel */ - nir_metadata_require(impl, nir_metadata_block_index); + /* we'll need these for isel */ + nir_metadata_require(impl, nir_metadata_block_index | nir_metadata_dominance); if (!ctx->stage.has(SWStage::GSCopy) && ctx->options->dump_preoptir) { fprintf(stderr, "NIR shader before instruction selection:\n"); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit