pan/bi: Add bi_{abs, neg} helpers
Just conveniences. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8215>
This commit is contained in:
@@ -504,6 +504,22 @@ bi_byte(bi_index idx, unsigned lane)
|
||||
return idx;
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
bi_abs(bi_index idx)
|
||||
{
|
||||
assert(idx.type != BI_INDEX_CONSTANT);
|
||||
idx.abs = true;
|
||||
return idx;
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
bi_neg(bi_index idx)
|
||||
{
|
||||
assert(idx.type != BI_INDEX_CONSTANT);
|
||||
idx.neg ^= true;
|
||||
return idx;
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
bi_imm_u8(uint8_t imm)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user