Mesa (master): vc4: Make sure thread end doesn't have a uniform read.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Sep 17 21:31:06 UTC 2014
Module: Mesa
Branch: master
Commit: 79be2cc383f45e3e1e36e1ab774f2a3ea268cad5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=79be2cc383f45e3e1e36e1ab774f2a3ea268cad5
Author: Eric Anholt <eric at anholt.net>
Date: Tue Sep 16 17:24:03 2014 -0700
vc4: Make sure thread end doesn't have a uniform read.
Prevents regression when I start doing copy propagation on uniforms.
---
src/gallium/drivers/vc4/vc4_qpu_emit.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c
index 6c4c76d..592fab9 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -528,6 +528,14 @@ vc4_generate_code(struct vc4_compile *c)
serialize_one_inst(c, qpu_NOP());
}
+ /* thread end can't have uniform read */
+ if (QPU_GET_FIELD(c->qpu_insts[c->qpu_inst_count - 1],
+ QPU_RADDR_A) == QPU_R_UNIF ||
+ QPU_GET_FIELD(c->qpu_insts[c->qpu_inst_count - 1],
+ QPU_RADDR_B) == QPU_R_UNIF) {
+ serialize_one_inst(c, qpu_NOP());
+ }
+
c->qpu_insts[c->qpu_inst_count - 1] =
qpu_set_sig(c->qpu_insts[c->qpu_inst_count - 1],
QPU_SIG_PROG_END);
More information about the mesa-commit
mailing list