ir3: fix possible signed overflow in ir3_link_add

`1 << 31` is undefined since `1` is a signed integer.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 1f9839907a ("ir3: Skip missing VS outputs in VS out map when linking")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42147>
This commit is contained in:
Job Noorman 2026-06-10 12:21:49 +02:00 committed by Marge Bot
parent b83f446642
commit 11334c438a

View file

@ -1353,7 +1353,7 @@ ir3_link_add(struct ir3_shader_linkage *l, uint8_t slot, uint8_t regid_,
{
for (unsigned j = 0; j < util_last_bit(compmask); j++) {
uint8_t comploc = loc + j;
l->varmask[comploc / 32] |= 1 << (comploc % 32);
l->varmask[comploc / 32] |= UINT32_C(1) << (comploc % 32);
}
l->max_loc = MAX2(l->max_loc, loc + util_last_bit(compmask));