Module: Mesa Branch: main Commit: d17dc3e9cd7047020edc67db8d9fdd5c4cfc04f0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d17dc3e9cd7047020edc67db8d9fdd5c4cfc04f0
Author: Karol Herbst <g...@karolherbst.de> Date: Sat Jun 10 00:10:12 2023 +0200 nir: Stop assuming glsl_get_length() returns 0 for vectors Reviewed-by: Alyssa Rosenzweig <aly...@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580> --- src/compiler/nir/nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 3143fc8201f..6db4af17d4c 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -318,7 +318,7 @@ nir_create_variable_with_location(nir_shader *shader, nir_variable_mode mode, in /* Only supporting non-array, or arrayed-io types, because otherwise we don't * know how much to increment num_inputs/outputs */ - assert(glsl_get_length(type) <= 1); + assert(glsl_type_is_vector_or_scalar(type) || glsl_type_is_unsized_array(type)); const char *name; switch (mode) {