diff options
author | Eric Anholt <[email protected]> | 2017-12-14 09:28:42 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-07-31 16:05:04 -0700 |
commit | 3471ce99850cd2ebfe04a10d01f5fe69a349594f (patch) | |
tree | 4bc1b6a95aa7e1e2d411991922ace0b639c7bf8c /src/broadcom/compiler/qpu_schedule.c | |
parent | 7d36c866d27f60685ae471264c2059c5b52e0e48 (diff) |
v3d: Add support for the TMUWT instruction.
This instruction is used to ensure that TMU stores have been processed
before moving on. In particular, you need any TMU ops to be done by the
time the shader ends.
Diffstat (limited to 'src/broadcom/compiler/qpu_schedule.c')
-rw-r--r-- | src/broadcom/compiler/qpu_schedule.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c index 441b6327825..fb5ecd6410c 100644 --- a/src/broadcom/compiler/qpu_schedule.c +++ b/src/broadcom/compiler/qpu_schedule.c @@ -402,7 +402,7 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n) add_write_dep(state, &state->last_tmu_config, n); } - if (inst->sig.ldtmu) { + if (v3d_qpu_waits_on_tmu(inst)) { /* TMU loads are coming from a FIFO, so ordering is important. */ add_write_dep(state, &state->last_tmu_write, n); @@ -564,7 +564,7 @@ get_instruction_priority(const struct v3d_qpu_instr *inst) next_score++; /* Schedule texture read results collection late to hide latency. */ - if (inst->sig.ldtmu) + if (v3d_qpu_waits_on_tmu(inst)) return next_score; next_score++; @@ -605,6 +605,9 @@ qpu_accesses_peripheral(const struct v3d_qpu_instr *inst) return true; } + if (inst->alu.add.op == V3D_QPU_A_TMUWT) + return true; + if (inst->alu.mul.op != V3D_QPU_M_NOP && inst->alu.mul.magic_write && qpu_magic_waddr_is_periph(inst->alu.mul.waddr)) { @@ -910,7 +913,7 @@ static uint32_t magic_waddr_latency(enum v3d_qpu_waddr waddr, * * because we associate the first load_tmu0 with the *second* tmu0_s. */ - if (v3d_qpu_magic_waddr_is_tmu(waddr) && after->sig.ldtmu) + if (v3d_qpu_magic_waddr_is_tmu(waddr) && v3d_qpu_waits_on_tmu(after)) return 100; /* Assume that anything depending on us is consuming the SFU result. */ |