summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bitset.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-04-04 09:47:03 -0700
committerEric Anholt <[email protected]>2013-04-12 16:32:12 -0700
commitdf25b4f3cf22282b06e622f3cf1f5855b8f767a8 (patch)
tree0b61ecc2d28452187ede83b9881d7ab8ad201058 /src/mesa/main/bitset.h
parentb5a0f59c0f167c2d99b585371e76c80c5342990c (diff)
mesa: Add a macro to bitset for determining bitset size.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main/bitset.h')
-rw-r--r--src/mesa/main/bitset.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/bitset.h b/src/mesa/main/bitset.h
index 28b3c127e75..defb7339e86 100644
--- a/src/mesa/main/bitset.h
+++ b/src/mesa/main/bitset.h
@@ -42,8 +42,8 @@
/* bitset declarations
*/
-#define BITSET_DECLARE(name, size) \
- BITSET_WORD name[((size) + BITSET_WORDBITS - 1) / BITSET_WORDBITS]
+#define BITSET_WORDS(bits) (ALIGN(bits, BITSET_WORDBITS) / BITSET_WORDBITS)
+#define BITSET_DECLARE(name, bits) BITSET_WORD name[BITSET_WORDS(bits)]
/* bitset operations
*/