mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 13:00:09 +01:00
broadcom/compiler: add a v3d_qpu_instr_is_legacy_sfu helper
This checks for the deprecated, old-style SFU instructions triggered by magic writes. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22593>
This commit is contained in:
parent
4a3be610d5
commit
b3ac456eb1
2 changed files with 9 additions and 2 deletions
|
|
@ -660,9 +660,15 @@ 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.op != V3D_QPU_A_NOP &&
|
||||
inst->alu.add.magic_write &&
|
||||
|
|
|
|||
|
|
@ -452,6 +452,7 @@ bool v3d_qpu_magic_waddr_is_tsy(enum v3d_qpu_waddr waddr) ATTRIBUTE_CONST;
|
|||
bool v3d_qpu_magic_waddr_loads_unif(enum v3d_qpu_waddr waddr) ATTRIBUTE_CONST;
|
||||
bool v3d_qpu_uses_tlb(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
|
||||
bool v3d_qpu_instr_is_sfu(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
|
||||
bool v3d_qpu_instr_is_legacy_sfu(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
|
||||
bool v3d_qpu_uses_sfu(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
|
||||
bool v3d_qpu_writes_tmu(const struct v3d_device_info *devinfo,
|
||||
const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue