mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02: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>
(cherry picked from commit b3ac456eb1)
This commit is contained in:
parent
6a43c3f8ca
commit
a6383b1099
3 changed files with 10 additions and 3 deletions
|
|
@ -211,7 +211,7 @@
|
|||
"description": "broadcom/compiler: add a v3d_qpu_instr_is_legacy_sfu helper",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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