aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 030643a1ca2..33721f16c72 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1223,7 +1223,7 @@ emit_frag_end(struct vc4_compile *c)
if (c->output_position_index != -1) {
qir_FTOI_dest(c, qir_reg(QFILE_TLB_Z_WRITE, 0),
qir_FMUL(c,
- c->outputs[c->output_position_index + 2],
+ c->outputs[c->output_position_index],
qir_uniform_f(c, 0xffffff)))->cond = discard_cond;
} else {
qir_MOV_dest(c, qir_reg(QFILE_TLB_Z_WRITE, 0),