agx: Add and use replace_src helper

From Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19590>
This commit is contained in:
Alyssa Rosenzweig
2022-11-04 23:26:06 -04:00
committed by Marge Bot
parent adf3cbc04c
commit 27869f6966
3 changed files with 8 additions and 2 deletions

View File

@@ -336,6 +336,12 @@ typedef struct {
unsigned mask : 4;
} agx_instr;
static inline void
agx_replace_src(agx_instr *I, unsigned src_index, agx_index replacement)
{
I->src[src_index] = agx_replace_index(I->src[src_index], replacement);
}
struct agx_block;
typedef struct agx_block {