mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
pan/midgard: Add mir_rewrite_index_dst_single helper
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
d68019ad1f
commit
6f1c8c148d
2 changed files with 8 additions and 2 deletions
|
|
@ -478,6 +478,7 @@ void mir_rewrite_index(compiler_context *ctx, unsigned old, unsigned new);
|
|||
void mir_rewrite_index_src(compiler_context *ctx, unsigned old, unsigned new);
|
||||
void mir_rewrite_index_dst(compiler_context *ctx, unsigned old, unsigned new);
|
||||
void mir_rewrite_index_dst_tag(compiler_context *ctx, unsigned old, unsigned new, unsigned tag);
|
||||
void mir_rewrite_index_dst_single(midgard_instruction *ins, unsigned old, unsigned new);
|
||||
void mir_rewrite_index_src_single(midgard_instruction *ins, unsigned old, unsigned new);
|
||||
void mir_rewrite_index_src_tag(compiler_context *ctx, unsigned old, unsigned new, unsigned tag);
|
||||
void mir_rewrite_index_src_swizzle(compiler_context *ctx, unsigned old, unsigned new, unsigned swizzle);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@ void mir_rewrite_index_src_single(midgard_instruction *ins, unsigned old, unsign
|
|||
}
|
||||
}
|
||||
|
||||
void mir_rewrite_index_dst_single(midgard_instruction *ins, unsigned old, unsigned new)
|
||||
{
|
||||
if (ins->ssa_args.dest == old)
|
||||
ins->ssa_args.dest = new;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
mir_get_swizzle(midgard_instruction *ins, unsigned idx)
|
||||
{
|
||||
|
|
@ -181,8 +187,7 @@ void
|
|||
mir_rewrite_index_dst(compiler_context *ctx, unsigned old, unsigned new)
|
||||
{
|
||||
mir_foreach_instr_global(ctx, ins) {
|
||||
if (ins->ssa_args.dest == old)
|
||||
ins->ssa_args.dest = new;
|
||||
mir_rewrite_index_dst_single(ins, old, new);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue