aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-04-25 16:24:15 -0700
committerEric Anholt <[email protected]>2018-04-26 11:30:22 -0700
commit77b4f30bae4100b2a80e961b89359e1fd1beed9d (patch)
tree71bb8104c962aff051cc26b0bc1a0581686682ce
parent089c32eefd2f9afcbfc87349beacbdf9d005cfac (diff)
broadcom/vc5: Add validation that we don't violate GFXH-1633 requirements.
We don't use ldunifa yet, but we will eventually for UBOs.
-rw-r--r--src/broadcom/compiler/qpu_validate.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/broadcom/compiler/qpu_validate.c b/src/broadcom/compiler/qpu_validate.c
index b459d81b446..fb2ed123aba 100644
--- a/src/broadcom/compiler/qpu_validate.c
+++ b/src/broadcom/compiler/qpu_validate.c
@@ -124,6 +124,19 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)
fail_instr(state, "LDUNIF after a LDVARY");
}
+ /* GFXH-1633 */
+ bool last_reads_ldunif = (state->last && (state->last->sig.ldunif ||
+ state->last->sig.ldunifrf));
+ bool last_reads_ldunifa = (state->last && (state->last->sig.ldunifa ||
+ state->last->sig.ldunifarf));
+ bool reads_ldunif = inst->sig.ldunif || inst->sig.ldunifrf;
+ bool reads_ldunifa = inst->sig.ldunifa || inst->sig.ldunifarf;
+ if ((last_reads_ldunif && reads_ldunifa) ||
+ (last_reads_ldunifa && reads_ldunif)) {
+ fail_instr(state,
+ "LDUNIF and LDUNIFA can't be next to each other");
+ }
+
int tmu_writes = 0;
int sfu_writes = 0;
int vpm_writes = 0;