pco: remove modifiers from instructions with variable src/dests

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
Simon Perretta 2025-04-06 17:02:37 +01:00 committed by Marge Bot
parent 66d5815919
commit 98de03e261
2 changed files with 7 additions and 1 deletions

View file

@ -32,6 +32,9 @@ static inline
bool pco_instr_dest_has_mod(const pco_instr *instr, unsigned dest, enum pco_ref_mod mod)
{
const struct pco_op_info *info = &pco_op_info[instr->op];
if (info->num_dests == ~0)
return false;
assert(dest < info->num_dests);
assert(mod < _PCO_REF_MOD_COUNT);
return (info->dest_mods[dest] & (1ULL << mod)) != 0;
@ -41,6 +44,9 @@ static inline
bool pco_instr_src_has_mod(const pco_instr *instr, unsigned src, enum pco_ref_mod mod)
{
const struct pco_op_info *info = &pco_op_info[instr->op];
if (info->num_srcs == ~0)
return false;
assert(src < info->num_srcs);
assert(mod < _PCO_REF_MOD_COUNT);
return (info->src_mods[src] & (1ULL << mod)) != 0;

View file

@ -478,7 +478,7 @@ O_FABS = pseudo_op('fabs', OM_ALU, 1, 1)
O_FFLR = pseudo_op('fflr', OM_ALU, 1, 1)
O_MOV = pseudo_op('mov', OM_ALU, 1, 1)
O_MOV_OFFSET = pseudo_op('mov.offset', OM_ALU + [OM_OFFSET_SD], 1, 2)
O_VEC = pseudo_op('vec', [OM_EXEC_CND], 1, VARIABLE, [], [[RM_ABS, RM_NEG]])
O_VEC = pseudo_op('vec', [OM_EXEC_CND], 1, VARIABLE)
O_COMP = pseudo_op('comp', [], 1, 2)
O_IADD32_ATOMIC_OFFSET = pseudo_op('iadd32.atomic.offset', OM_ALU_ATOMEXT + [OM_S], 2, 4, [], [[RM_ABS, RM_NEG], [RM_ABS, RM_NEG]])