broadcom/vc5: Add validation that we don't violate GFXH-1625 requirements.
authorEric Anholt <eric@anholt.net>
Wed, 25 Apr 2018 23:16:27 +0000 (16:16 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 26 Apr 2018 18:30:22 +0000 (11:30 -0700)
We don't use TMUWT yet, but we will once we do SSBOs.

src/broadcom/compiler/qpu_validate.c

index 492f2e64d09ba0b790ac479ffb0f9a252dd3182a..b459d81b446736c894bdb44c912399c4eacd3529 100644 (file)
@@ -247,6 +247,11 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)
 
                 if (v3d_qpu_sig_writes_address(devinfo, &inst->sig))
                         fail_instr(state, "RF write after THREND");
+
+                /* GFXH-1625: No TMUWT in the last instruction */
+                if (state->last_thrsw_ip - state->ip == 2 &&
+                    inst->alu.add.op == V3D_QPU_A_TMUWT)
+                        fail_instr(state, "TMUWT in last instruction");
         }
 
         if (inst->type == V3D_QPU_INSTR_TYPE_BRANCH) {