mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-25 22:20:34 +01:00
broadcom/compiler: add a vir_get_cond helper
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12278>
This commit is contained in:
parent
7ccecf2096
commit
b727eaac3c
2 changed files with 14 additions and 0 deletions
|
|
@ -1049,6 +1049,7 @@ struct v3d_qpu_instr v3d_qpu_nop(void);
|
|||
struct qreg vir_emit_def(struct v3d_compile *c, struct qinst *inst);
|
||||
struct qinst *vir_emit_nondef(struct v3d_compile *c, struct qinst *inst);
|
||||
void vir_set_cond(struct qinst *inst, enum v3d_qpu_cond cond);
|
||||
enum v3d_qpu_cond vir_get_cond(struct qinst *inst);
|
||||
void vir_set_pf(struct v3d_compile *c, struct qinst *inst, enum v3d_qpu_pf pf);
|
||||
void vir_set_uf(struct v3d_compile *c, struct qinst *inst, enum v3d_qpu_uf uf);
|
||||
void vir_set_unpack(struct qinst *inst, int src,
|
||||
|
|
|
|||
|
|
@ -243,6 +243,19 @@ vir_set_cond(struct qinst *inst, enum v3d_qpu_cond cond)
|
|||
}
|
||||
}
|
||||
|
||||
enum v3d_qpu_cond
|
||||
vir_get_cond(struct qinst *inst)
|
||||
{
|
||||
assert(inst->qpu.type == V3D_QPU_INSTR_TYPE_ALU);
|
||||
|
||||
if (vir_is_add(inst))
|
||||
return inst->qpu.flags.ac;
|
||||
else if (vir_is_mul(inst))
|
||||
return inst->qpu.flags.mc;
|
||||
else /* NOP */
|
||||
return V3D_QPU_COND_NONE;
|
||||
}
|
||||
|
||||
void
|
||||
vir_set_pf(struct v3d_compile *c, struct qinst *inst, enum v3d_qpu_pf pf)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue