summaryrefslogtreecommitdiffstats
path: root/src/broadcom/compiler/qpu_validate.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-01-03 21:42:33 -0800
committerEric Anholt <[email protected]>2018-01-12 21:53:45 -0800
commitdfee62eed3cacbf77ca3168143be6577849c998d (patch)
treeaa86205704ae035d857f49201b48829c5408c5f7 /src/broadcom/compiler/qpu_validate.c
parent81ec2ba22975595b4f07c3e8307a8f0a4ec18773 (diff)
broadcom/vc5: Add support for V3Dv4 signal bits.
The WRTMUC replaces the implicit uniform loads in the first two texture instructions. LDVPM disappears in favor of an ALU op. LDVARY, LDTMU, LDTLB, and LDUNIF*RF now write to arbitrary registers, which required passing the devinfo through to a few more functions.
Diffstat (limited to 'src/broadcom/compiler/qpu_validate.c')
-rw-r--r--src/broadcom/compiler/qpu_validate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/broadcom/compiler/qpu_validate.c b/src/broadcom/compiler/qpu_validate.c
index d99d76a8beb..3b2c10eabc6 100644
--- a/src/broadcom/compiler/qpu_validate.c
+++ b/src/broadcom/compiler/qpu_validate.c
@@ -85,6 +85,7 @@ qpu_magic_waddr_matches(const struct v3d_qpu_instr *inst,
static void
qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)
{
+ const struct v3d_device_info *devinfo = state->c->devinfo;
const struct v3d_qpu_instr *inst = &qinst->qpu;
if (inst->type != V3D_QPU_INSTR_TYPE_ALU)
@@ -94,7 +95,8 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)
* r5 one instruction later, which is illegal to have
* together.
*/
- if (state->last && state->last->sig.ldvary && inst->sig.ldunif) {
+ if (state->last && state->last->sig.ldvary &&
+ (inst->sig.ldunif || inst->sig.ldunifa)) {
fail_instr(state, "LDUNIF after a LDVARY");
}
@@ -143,7 +145,7 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)
if (v3d_qpu_uses_mux(inst, V3D_QPU_MUX_R4))
fail_instr(state, "R4 read too soon after SFU");
- if (v3d_qpu_writes_r4(inst))
+ if (v3d_qpu_writes_r4(devinfo, inst))
fail_instr(state, "R4 write too soon after SFU");
if (sfu_writes)