diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-11-02 04:34:57 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-11-02 04:34:57 +0000 |
commit | 32aeb3c41fedbbd7b11aacfec48e8f699d16bff0 (patch) | |
tree | fc5893a490729ebf6b87b83eebf5d4ebfdfccf27 /lib/mesa/src/broadcom/qpu/qpu_instr.c | |
parent | 286ec9d289bada8abb84753c461cfa3432866e98 (diff) |
Import Mesa 23.1.9
Diffstat (limited to 'lib/mesa/src/broadcom/qpu/qpu_instr.c')
-rw-r--r-- | lib/mesa/src/broadcom/qpu/qpu_instr.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/mesa/src/broadcom/qpu/qpu_instr.c b/lib/mesa/src/broadcom/qpu/qpu_instr.c index a89999e35..1d9c8e6b1 100644 --- a/lib/mesa/src/broadcom/qpu/qpu_instr.c +++ b/lib/mesa/src/broadcom/qpu/qpu_instr.c @@ -660,16 +660,24 @@ v3d_qpu_uses_tlb(const struct v3d_qpu_instr *inst) bool v3d_qpu_uses_sfu(const struct v3d_qpu_instr *inst) { - if (v3d_qpu_instr_is_sfu(inst)) - return true; + return v3d_qpu_instr_is_sfu(inst) || v3d_qpu_instr_is_legacy_sfu(inst); +} +/* Checks whether the instruction implements a SFU operation by the writing + * to specific magic register addresses instead of using SFU ALU opcodes. + */ +bool +v3d_qpu_instr_is_legacy_sfu(const struct v3d_qpu_instr *inst) +{ if (inst->type == V3D_QPU_INSTR_TYPE_ALU) { - if (inst->alu.add.magic_write && + if (inst->alu.add.op != V3D_QPU_A_NOP && + inst->alu.add.magic_write && v3d_qpu_magic_waddr_is_sfu(inst->alu.add.waddr)) { return true; } - if (inst->alu.mul.magic_write && + if (inst->alu.mul.op != V3D_QPU_M_NOP && + inst->alu.mul.magic_write && v3d_qpu_magic_waddr_is_sfu(inst->alu.mul.waddr)) { return true; } |