Module: Mesa Branch: main Commit: 5db458eb2df31d4abd53ea7cef371e41302b3618 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5db458eb2df31d4abd53ea7cef371e41302b3618
Author: Karol Herbst <[email protected]> Date: Mon Jun 26 10:54:02 2023 +0200 ir2: Stop assuming glsl_get_length() returns 0 for vectors Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580> --- src/gallium/drivers/freedreno/a2xx/ir2_nir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c index 33bd565e140..bf7f717e20a 100644 --- a/src/gallium/drivers/freedreno/a2xx/ir2_nir.c +++ b/src/gallium/drivers/freedreno/a2xx/ir2_nir.c @@ -789,11 +789,11 @@ static void setup_input(struct ir2_context *ctx, nir_variable *in) { struct fd2_shader_stateobj *so = ctx->so; - ASSERTED unsigned array_len = MAX2(glsl_get_length(in->type), 1); unsigned n = in->data.driver_location; unsigned slot = in->data.location; - assert(array_len == 1); + assert(glsl_type_is_vector_or_scalar(in->type) || + glsl_type_is_unsized_array(in->type)); /* handle later */ if (ctx->so->type == MESA_SHADER_VERTEX)
