diff options
-rw-r--r-- | src/panfrost/midgard/compiler.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 294831c352e..3002a079dea 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -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); |