mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
radeonsi: add comments for unpack_2x16* utility functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25972>
This commit is contained in:
parent
d5ef8a0ac0
commit
740a4c3448
1 changed files with 2 additions and 0 deletions
|
|
@ -27,12 +27,14 @@ static nir_def *get_global_ids(nir_builder *b, unsigned num_components)
|
|||
return nir_iadd(b, nir_imul(b, block_ids, block_size), local_ids);
|
||||
}
|
||||
|
||||
/* unpack_2x16(src, x, y): x = src & 0xffff; y = src >> 16; */
|
||||
static void unpack_2x16(nir_builder *b, nir_def *src, nir_def **x, nir_def **y)
|
||||
{
|
||||
*x = nir_iand_imm(b, src, 0xffff);
|
||||
*y = nir_ushr_imm(b, src, 16);
|
||||
}
|
||||
|
||||
/* unpack_2x16_signed(src, x, y): x = (int32_t)((uint16_t)src); y = src >> 16; */
|
||||
static void unpack_2x16_signed(nir_builder *b, nir_def *src, nir_def **x, nir_def **y)
|
||||
{
|
||||
*x = nir_i2i32(b, nir_u2u16(b, src));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue