glsl: preserve all metadata when lower_buffer_interface_derefs doesn't make progress
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Fri, 6 Aug 2021 13:27:52 +0000 (15:27 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 5 Oct 2021 10:02:54 +0000 (10:02 +0000)
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13189>

src/compiler/glsl/gl_nir_lower_buffers.c

index b0ce128..06460ad 100644 (file)
@@ -320,6 +320,8 @@ lower_buffer_interface_derefs_impl(nir_function_impl *impl,
    if (progress) {
       nir_metadata_preserve(impl, nir_metadata_block_index |
                                   nir_metadata_dominance);
+   } else {
+      nir_metadata_preserve(impl, nir_metadata_all);
    }
 
    return progress;