Mesa (master): v3d: Only add output slot tracking for the current varying slot.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 30 17:58:28 UTC 2018


Module: Mesa
Branch: master
Commit: c152c79d5ee59cc8b3936e5b31f8b4203327bc2e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c152c79d5ee59cc8b3936e5b31f8b4203327bc2e

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Sep 28 12:40:32 2018 -0700

v3d: Only add output slot tracking for the current varying slot.

We always emit 4 slots per slot because things like color output and
position processing in the epilogue will potentially look up more values
than the variable declaration had.  However, when we get a .location_frac
!= 0, we don't want to overwrite components of the following
.driver_location.

---

 src/broadcom/compiler/nir_to_vir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c
index 4becc972a6..bb41c1be97 100644
--- a/src/broadcom/compiler/nir_to_vir.c
+++ b/src/broadcom/compiler/nir_to_vir.c
@@ -1396,7 +1396,7 @@ ntq_setup_outputs(struct v3d_compile *c)
                 assert(array_len == 1);
                 (void)array_len;
 
-                for (int i = 0; i < 4; i++) {
+                for (int i = 0; i < 4 - var->data.location_frac; i++) {
                         add_output(c, loc + var->data.location_frac + i,
                                    var->data.location,
                                    var->data.location_frac + i);




More information about the mesa-commit mailing list