Files
mesa/src/util
Alyssa Rosenzweig 593517a53a util: add BITSET_*_COUNT macros
We currently have BITSET_*_RANGE macros which take a closed interval/range: a
start bit and an end bit. Occassionally that is what you want, but most of the
time callers actually want a start and a length. For example, register
allocators will often do operations at (variable start register, variable start
register + variable size - 1). It's more convenient to just take a start and a
size, while also making the size=0 case well-defined as a no-op set/clear and
false for test.

This patch adds BITSET_*_COUNT macros aliasing to the existing range macros, and
the rest of the series converts many call sites across the tree to use the new
macros.

Of the few call sites not converted, a whole bunch look like off-by-one bugs
which I did not want to "fix" here and risk breaking something else. Probably
worth checking your driver if you have RANGE calls leftover after this series.

Also, aco and dozen both open-coded RANGE helpers that should probably be
switched to the common code but that's neither here nor there.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:10 +00:00
..
2025-09-16 06:16:20 +00:00
2023-11-02 21:03:46 +00:00
2025-12-16 17:42:10 +00:00
2023-12-06 07:22:02 +00:00
2025-11-17 22:50:07 +00:00
2025-11-17 22:50:07 +00:00
2025-11-04 13:39:48 +00:00
2025-10-15 23:01:33 +00:00
2023-10-09 23:37:52 +00:00
2025-06-23 07:59:24 +00:00
2025-06-23 07:59:24 +00:00
2025-10-15 23:01:33 +00:00
2024-01-16 02:15:22 +00:00
2025-09-16 21:48:37 +00:00
2025-09-16 21:48:37 +00:00
2023-10-25 17:27:47 +00:00
2025-12-12 10:03:02 +01:00
2025-09-23 09:09:55 +02:00
2025-12-12 10:03:02 +01:00
2025-04-11 21:27:37 +00:00
2025-10-15 23:01:33 +00:00
2024-11-08 08:09:49 -08:00
2025-09-23 09:09:55 +02:00
2025-10-15 23:01:33 +00:00
2025-08-08 19:38:54 +00:00