zink: use MAX_PATCH_VERTICES directly for arrayed io var sizing
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 29 Aug 2023 15:14:02 +0000 (11:14 -0400)
committerMarge Bot <emma+marge@anholt.net>
Sat, 9 Sep 2023 04:15:44 +0000 (04:15 +0000)
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24950>

src/gallium/drivers/zink/zink_compiler.c

index c1bbbe6..cfb2454 100644 (file)
@@ -5028,7 +5028,7 @@ rework_io_vars(nir_shader *nir, nir_variable_mode mode)
                   vec_type = glsl_array_type(vec_type, slot_count, glsl_get_explicit_stride(vec_type));
             }
             if (is_arrayed)
-               vec_type = glsl_array_type(vec_type, glsl_array_size(old_var->type), glsl_get_explicit_stride(vec_type));
+               vec_type = glsl_array_type(vec_type, 32 /* MAX_PATCH_VERTICES */, glsl_get_explicit_stride(vec_type));
             if (vars[location][c]) {
                if (glsl_get_vector_elements(glsl_without_array(vars[location][c]->type)) < glsl_get_vector_elements(glsl_without_array(vec_type))) {
                   /* enlarge existing vars if necessary */