broadcom/compiler: fix offset alignment for ldunifa when skipping

The intention was to align the address to 4 bytes (32-bit), not
16 bytes.

Fixes: bdb6201ea1 ("broadcom/compiler: use ldunifa with unaligned constant offset")

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14830>
This commit is contained in:
Iago Toral Quiroga 2022-02-02 11:39:53 +01:00 committed by Marge Bot
parent 04f6e91de0
commit 0a8449b07c

View file

@ -3034,7 +3034,7 @@ ntq_emit_load_ubo_unifa(struct v3d_compile *c, nir_intrinsic_instr *instr)
* alignment and skip over unused elements in result.
*/
value_skips = (const_offset % 4) / (bit_size / 8);
const_offset &= ~0xf;
const_offset &= ~0x3;
}
}