aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-02-05 13:14:12 -0800
committerEric Anholt <[email protected]>2019-02-18 18:09:06 -0800
commit146e432b4971eb24f2b4b92a8c203bb3f66382f5 (patch)
tree140b0d0eb5ce56f0f0e7810aa5e5d72e172e70c0 /src
parentcd5e0b272919a654079620adecd2abe24ff51233 (diff)
v3d: Fix incorrect flagging of ldtmu as writing r4 on v3d 4.x.
Fixes some stalls in 3DMMES's main vertex shader. total instructions in shared programs: 6280751 -> 6211270 (-1.11%) instructions in affected programs: 2935050 -> 2865569 (-2.37%)
Diffstat (limited to 'src')
-rw-r--r--src/broadcom/qpu/qpu_instr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c
index 12a9c32c831..22f574ce5e4 100644
--- a/src/broadcom/qpu/qpu_instr.c
+++ b/src/broadcom/qpu/qpu_instr.c
@@ -751,9 +751,6 @@ bool
v3d_qpu_writes_r4(const struct v3d_device_info *devinfo,
const struct v3d_qpu_instr *inst)
{
- if (inst->sig.ldtmu)
- return true;
-
if (inst->type == V3D_QPU_INSTR_TYPE_ALU) {
if (inst->alu.add.magic_write &&
(inst->alu.add.waddr == V3D_QPU_WADDR_R4 ||
@@ -768,8 +765,10 @@ v3d_qpu_writes_r4(const struct v3d_device_info *devinfo,
}
}
- if (v3d_qpu_sig_writes_address(devinfo, &inst->sig) &&
- inst->sig_magic && inst->sig_addr == V3D_QPU_WADDR_R4) {
+ if (v3d_qpu_sig_writes_address(devinfo, &inst->sig)) {
+ if (inst->sig_magic && inst->sig_addr == V3D_QPU_WADDR_R4)
+ return true;
+ } else if (inst->sig.ldtmu) {
return true;
}