Mesa (main): zink: drop some more vla usage

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 16 13:15:55 UTC 2021


Module: Mesa
Branch: main
Commit: 3179ce61e936e097090d88632bcd95dcaaebc8dc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3179ce61e936e097090d88632bcd95dcaaebc8dc

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Jun 15 08:15:42 2021 -0700

zink: drop some more vla usage

MSVC doesn't like them, so let's get rid of more of them.

Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11380>

---

 src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index ca46e505d6a..bac914baa16 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -3047,7 +3047,7 @@ emit_tex(struct ntv_context *ctx, nir_tex_instr *tex)
    }
 
    if (proj && coord_components > 0) {
-      SpvId constituents[coord_components + 1];
+      SpvId constituents[NIR_MAX_VEC_COMPONENTS + 1];
       if (coord_components == 1)
          constituents[0] = coord;
       else {



More information about the mesa-commit mailing list