nir: Fix metadata in nir_lower_is_helper_invocation
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Thu, 17 Aug 2023 22:51:15 +0000 (17:51 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 18 Aug 2023 17:39:53 +0000 (17:39 +0000)
It does not preserve everything.  It adds and removes instructions and
even adds a variable.

Fixes: f17b41ab4f01 ("nir: add lowering pass for helperInvocationEXT()")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24760>

src/compiler/nir/nir_lower_is_helper_invocation.c

index a85e582..ab22df4 100644 (file)
@@ -116,6 +116,7 @@ nir_lower_is_helper_invocation(nir_shader *shader)
 
    return nir_shader_instructions_pass(shader,
                                        nir_lower_load_and_store_is_helper,
-                                       nir_metadata_all,
+                                       nir_metadata_block_index |
+                                          nir_metadata_dominance,
                                        is_helper_deref);
 }