diff options
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_math.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index ca6d0f1dfc8..8eb840f1ec0 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -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. |