diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c index af864b86e64..3a818d64d96 100644 --- a/src/broadcom/compiler/qpu_schedule.c +++ b/src/broadcom/compiler/qpu_schedule.c @@ -83,6 +83,7 @@ struct schedule_state { struct schedule_node *last_vpm; struct schedule_node *last_unif; struct schedule_node *last_rtop; + struct schedule_node *last_unifa; enum direction dir; /* Estimated cycle when the current instruction would start. */ uint32_t time; @@ -228,6 +229,11 @@ process_waddr_deps(struct schedule_state *state, struct schedule_node *n, add_write_dep(state, &state->last_tmu_write, n); break; + case V3D_QPU_WADDR_UNIFA: + if (state->devinfo->ver >= 40) + add_write_dep(state, &state->last_unifa, n); + break; + case V3D_QPU_WADDR_NOP: break; @@ -400,6 +406,10 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n) if (vir_has_uniform(qinst)) add_write_dep(state, &state->last_unif, n); + /* Both unifa and ldunifa must preserve ordering */ + if (inst->sig.ldunifa || inst->sig.ldunifarf) + add_write_dep(state, &state->last_unifa, n); + if (v3d_qpu_reads_flags(inst)) add_read_dep(state, state->last_sf, n); if (v3d_qpu_writes_flags(inst))