pan/bi: Paste over bi_has_arg
While we're at it, cleanup the Midgard one. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150>
This commit is contained in:

committed by
Marge Bot

parent
9b75f410c4
commit
e94754a7c4
@@ -60,3 +60,17 @@ bi_is_src_swizzled(bi_instruction *ins, unsigned s)
|
||||
|
||||
return classy && small && first;
|
||||
}
|
||||
|
||||
bool
|
||||
bi_has_arg(bi_instruction *ins, unsigned arg)
|
||||
{
|
||||
if (!ins)
|
||||
return false;
|
||||
|
||||
bi_foreach_src(ins, s) {
|
||||
if (ins->src[s] == arg)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@@ -474,6 +474,7 @@ bir_dest_index(nir_dest *dst)
|
||||
bool bi_has_outmod(bi_instruction *ins);
|
||||
bool bi_has_source_mods(bi_instruction *ins);
|
||||
bool bi_is_src_swizzled(bi_instruction *ins, unsigned s);
|
||||
bool bi_has_arg(bi_instruction *ins, unsigned arg);
|
||||
|
||||
/* BIR passes */
|
||||
|
||||
|
@@ -602,7 +602,7 @@ mir_has_arg(midgard_instruction *ins, unsigned arg)
|
||||
if (!ins)
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(ins->src); ++i) {
|
||||
mir_foreach_src(ins, i) {
|
||||
if (ins->src[i] == arg)
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user