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

Author: Faith Ekstrand <[email protected]>
Date:   Thu Apr 27 23:24:36 2023 -0500

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22580>

---

 src/broadcom/compiler/nir_to_vir.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/broadcom/compiler/nir_to_vir.c 
b/src/broadcom/compiler/nir_to_vir.c
index ad677e3e0fb..095f92c9022 100644
--- a/src/broadcom/compiler/nir_to_vir.c
+++ b/src/broadcom/compiler/nir_to_vir.c
@@ -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,

Reply via email to