mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 20:30:12 +01:00
pan/bi: Add bi_swz_16 helper
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065>
This commit is contained in:
parent
6bc7a0b366
commit
f9bc168bd3
1 changed files with 8 additions and 2 deletions
|
|
@ -168,13 +168,19 @@ bi_word(bi_index idx, unsigned component)
|
|||
|
||||
/* Helps construct swizzles */
|
||||
static inline bi_index
|
||||
bi_half(bi_index idx, bool upper)
|
||||
bi_swz_16(bi_index idx, bool x, bool y)
|
||||
{
|
||||
assert(idx.swizzle == BI_SWIZZLE_H01);
|
||||
idx.swizzle = upper ? BI_SWIZZLE_H11 : BI_SWIZZLE_H00;
|
||||
idx.swizzle = BI_SWIZZLE_H00 | (x << 1) | y;
|
||||
return idx;
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
bi_half(bi_index idx, bool upper)
|
||||
{
|
||||
return bi_swz_16(idx, upper, upper);
|
||||
}
|
||||
|
||||
static inline bi_index
|
||||
bi_byte(bi_index idx, unsigned lane)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue