v3d: Stop assuming glsl_get_length() returns 0 for vectors

Checking for whether or not it's a plain vector is actually what we want
anyway. There's no point in handling arays of length 1.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>
This commit is contained in:
Faith Ekstrand
2023-04-27 23:24:36 -05:00
committed by Marge Bot
parent ed79690196
commit 2db20af82e

View File

@@ -2340,12 +2340,9 @@ ntq_setup_outputs(struct v3d_compile *c)
return;
nir_foreach_shader_out_variable(var, c->s) {
unsigned array_len = MAX2(glsl_get_length(var->type), 1);
assert(glsl_type_is_vector_or_scalar(var->type));
unsigned loc = var->data.driver_location * 4;
assert(array_len == 1);
(void)array_len;
for (int i = 0; i < 4 - var->data.location_frac; i++) {
add_output(c, loc + var->data.location_frac + i,
var->data.location,