diff options
author | Marek Olšák <marek.olsak@amd.com> | 2017-01-06 00:07:21 +0100 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2017-01-16 18:07:08 +0100 |
commit | 44e9b67229c91d6741e4284cff4ea23cc350ed18 (patch) | |
tree | c143f7ef2e4650c4b7983053778251feed38709f /src/util/bitscan.h | |
parent | 8daf6de3deddef8f71f8b1af61b12cd8cb783433 (diff) | |
download | mesa-44e9b67229c91d6741e4284cff4ea23cc350ed18.tar.gz mesa-44e9b67229c91d6741e4284cff4ea23cc350ed18.tar.bz2 mesa-44e9b67229c91d6741e4284cff4ea23cc350ed18.zip |
radeonsi: make fix_fetch 64-bit
v2: add u_bit_consecutive64
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/util/bitscan.h')
-rw-r--r-- | src/util/bitscan.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/bitscan.h b/src/util/bitscan.h index a5dfa1f9e3b..32e027165cc 100644 --- a/src/util/bitscan.h +++ b/src/util/bitscan.h @@ -226,6 +226,15 @@ u_bit_consecutive(unsigned start, unsigned count) return ((1u << count) - 1) << start; } +static inline uint64_t +u_bit_consecutive64(unsigned start, unsigned count) +{ + assert(start + count <= 64); + if (count == 64) + return ~(uint64_t)0; + return (((uint64_t)1 << count) - 1) << start; +} + #ifdef __cplusplus } |