mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
panfrost/midgard: Add mir_has_arg helper
Helps scan the MIR for uses of an index. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
076838ef0c
commit
533d65786f
1 changed files with 12 additions and 0 deletions
|
|
@ -417,6 +417,18 @@ v_mov(unsigned src, midgard_vector_alu_src mod, unsigned dest)
|
|||
return ins;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
mir_has_arg(midgard_instruction *ins, unsigned arg)
|
||||
{
|
||||
if (ins->ssa_args.src0 == arg)
|
||||
return true;
|
||||
|
||||
if (ins->ssa_args.src1 == arg && !ins->ssa_args.inline_constant)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
midgard_instruction
|
||||
v_load_store_scratch(unsigned srcdest, unsigned index, bool is_store);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue