summaryrefslogtreecommitdiffstats
path: root/src/broadcom/compiler/nir_to_vir.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-09-28 12:40:32 -0700
committerEric Anholt <[email protected]>2018-10-30 10:46:52 -0700
commitc152c79d5ee59cc8b3936e5b31f8b4203327bc2e (patch)
tree877b81bc15355029d067fcc87ae690103756ab60 /src/broadcom/compiler/nir_to_vir.c
parent17c81989521731af25a633622a0ded437538ab00 (diff)
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.
Diffstat (limited to 'src/broadcom/compiler/nir_to_vir.c')
-rw-r--r--src/broadcom/compiler/nir_to_vir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c
index 4becc972a63..bb41c1be971 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);