asahi: Reexpress genxml pack macro

To let NIR unroll it. Workaround NIR bug.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498>
This commit is contained in:
Alyssa Rosenzweig 2023-10-01 19:44:51 -04:00 committed by Marge Bot
parent ed1b2f40fc
commit 103e300e7f

View file

@ -95,7 +95,7 @@ __gen_unpack_uint(CONSTANT uint32_t *restrict cl, uint32_t start, uint32_t end)
const int width = end - start + 1;
const uint64_t mask = (width == 64) ? ~((uint64_t)0) : ((uint64_t)1 << width) - 1;
for (unsigned word = start / 32; word <= end / 32; word++) {
for (unsigned word = start / 32; word < (end / 32) + 1; word++) {
val |= ((uint64_t) cl[word]) << ((word - start / 32) * 32);
}