zink: handle interface blocks in `copy_vars`
authorantonino <antonino.maniscalco@collabora.com>
Fri, 5 May 2023 15:40:32 +0000 (17:40 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 15 May 2023 11:04:41 +0000 (11:04 +0000)
Fixes: edaf49160e5 ("zink: fix array copying in pv lowering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

src/gallium/drivers/zink/zink_compiler.c

index a74af59..f44b647 100644 (file)
@@ -55,7 +55,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));
       }