nir: handle interface blocks in `copy_vars`
authorantonino <antonino.maniscalco@collabora.com>
Fri, 5 May 2023 15:39:38 +0000 (17:39 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 15 May 2023 11:04:41 +0000 (11:04 +0000)
Fixes: 99121c9b779 ("nir/gs: fix array type copying for passthrough gs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

src/compiler/nir/nir_passthrough_gs.c

index dc419b9..4f3b27e 100644 (file)
@@ -126,7 +126,7 @@ static void
 copy_vars(nir_builder *b, nir_deref_instr *dst, nir_deref_instr *src)
 {
    assert(glsl_get_bare_type(dst->type) == glsl_get_bare_type(src->type));
-   if (glsl_type_is_struct(dst->type)) {
+   if (glsl_type_is_struct_or_ifc(dst->type)) {
       for (unsigned i = 0; i < glsl_get_length(dst->type); ++i) {
          copy_vars(b, nir_build_deref_struct(b, dst, i), nir_build_deref_struct(b, src, i));
       }