mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
gallium/util: add u_bit_scan64
Same as u_bit_scan, but for uint64_t. Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
f2328ffdc8
commit
50433ea526
1 changed files with 7 additions and 0 deletions
|
|
@ -583,6 +583,13 @@ u_bit_scan(unsigned *mask)
|
|||
return i;
|
||||
}
|
||||
|
||||
static INLINE int
|
||||
u_bit_scan64(uint64_t *mask)
|
||||
{
|
||||
int i = ffsll(*mask) - 1;
|
||||
*mask &= ~(1llu << i);
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return float bits.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue