From: Marek Olšák <marek.ol...@amd.com>

I'll need this in radeonsi.
---
 src/gallium/auxiliary/util/u_math.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_math.h 
b/src/gallium/auxiliary/util/u_math.h
index 39bd40f..48d5c31 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -727,6 +727,14 @@ util_bitcount(unsigned n)
 #endif
 }
 
+
+static INLINE unsigned
+util_bitcount64(uint64_t n)
+{
+       return util_bitcount(n) + util_bitcount(n >> 32);
+}
+
+
 /**
  * Reverse bits in n
  * Algorithm taken from:
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to