From: Marek Olšák <[email protected]>
Same as u_bit_scan, but for uint64_t.
---
src/gallium/auxiliary/util/u_math.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/gallium/auxiliary/util/u_math.h
b/src/gallium/auxiliary/util/u_math.h
index 19c7343..f5d3487 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -587,6 +587,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.
--
2.1.0
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev