radv: fix setting inline push constants when only the last one is used

The 64bit mask was truncated, and then when the low half is 0, the base was -1.
By accident, u_bit_consecutive64(-1, 65) is the original mask, so we uploaded a
single garbage value.

Fixes: 7f6262bb85 ("radv: allow holes in inline push constants")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42182>
This commit is contained in:
Georg Lehmann 2026-06-11 17:11:05 +02:00 committed by Marge Bot
parent 92e4fb7aac
commit aacdaffc5e

View file

@ -6574,7 +6574,7 @@ radv_emit_push_constants_per_stage(const struct radv_device *device, struct radv
/* Emit inlined push constants. */
if (inline_push_const_mask) {
const uint8_t base = ffs(inline_push_const_mask) - 1;
const uint8_t base = ffsll(inline_push_const_mask) - 1;
if (inline_push_const_mask == u_bit_consecutive64(base, util_last_bit64(inline_push_const_mask) - base)) {
/* consecutive inline push constants */