mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
agx: add index size helper
to replace the switches. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963>
This commit is contained in:
parent
8e938d48f5
commit
75d911f0ee
1 changed files with 6 additions and 0 deletions
|
|
@ -82,6 +82,12 @@ agx_channels(agx_index idx)
|
|||
return idx.channels_m1 + 1;
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
agx_index_size_16(agx_index idx)
|
||||
{
|
||||
return agx_size_align_16(idx.size) * agx_channels(idx);
|
||||
}
|
||||
|
||||
static inline agx_index
|
||||
agx_get_vec_index(unsigned value, enum agx_size size, unsigned channels)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue