mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 06:20:09 +01:00
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:
parent
7e6be656d3
commit
e364e11020
1 changed files with 16 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue