asahi/genxml: fix 128-bit in CL path
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
This commit is contained in:
committed by
Marge Bot
parent
a34b3ecb75
commit
6a1a3dac21
@@ -20,9 +20,10 @@
|
||||
|
||||
#include "libagx.h"
|
||||
#define assert(x)
|
||||
#define FILE_TYPE void
|
||||
#define CONSTANT_ constant
|
||||
#define GLOBAL_ global
|
||||
#define FILE_TYPE void
|
||||
#define CONSTANT_ constant
|
||||
#define GLOBAL_ global
|
||||
#define BITFIELD64_MASK(x) ((x == 64) ? ~0ul : ((1ul << x) - 1))
|
||||
|
||||
static uint64_t
|
||||
util_bitpack_uint(uint64_t v, uint32_t start, uint32_t end)
|
||||
@@ -34,7 +35,7 @@ static uint64_t
|
||||
util_bitpack_sint(int64_t v, uint32_t start, uint32_t end)
|
||||
{
|
||||
const int bits = end - start + 1;
|
||||
const uint64_t mask = (bits == 64) ? ~((uint64_t)0) : (1ull << bits) - 1;
|
||||
const uint64_t mask = BITFIELD64_MASK(bits);
|
||||
return (v & mask) << start;
|
||||
}
|
||||
|
||||
@@ -157,7 +158,7 @@ __gen_to_groups(uint32_t value, uint32_t group_size, uint32_t length)
|
||||
uint32_t groups = DIV_ROUND_UP(value, group_size);
|
||||
|
||||
/* The 0 encoding means "all" */
|
||||
if (groups == (1ull << length))
|
||||
if (groups == ((uint64_t)1) << length)
|
||||
return 0;
|
||||
|
||||
/* Otherwise it's encoded as the identity */
|
||||
|
||||
Reference in New Issue
Block a user