diff options
| author | Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> | 2025-11-04 12:23:36 -0500 |
|---|---|---|
| committer | Marge Bot <marge-bot@fdo.invalid> | 2025-11-05 18:44:23 +0000 |
| commit | 18eacdda3ec897067f8c80f4fc5f1c14c2d459a0 (patch) | |
| tree | ed184416c181fb597cc84c992f8b75927e0cd35f /src/util | |
| parent | 53482178efdb81071e55fd44a338f3f6139633bd (diff) | |
util: add BITSET_BYTES helper
this comes up a lot.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/bitset.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/bitset.h b/src/util/bitset.h index 450facef29d..601f85ad9f8 100644 --- a/src/util/bitset.h +++ b/src/util/bitset.h @@ -46,6 +46,7 @@ */ #define BITSET_WORDS(bits) (((bits) + BITSET_WORDBITS - 1) / BITSET_WORDBITS) #define BITSET_DECLARE(name, bits) BITSET_WORD name[BITSET_WORDS(bits)] +#define BITSET_BYTES(bits) (BITSET_WORDS(bits) * sizeof(BITSET_WORD)) /* bitset operations */ |