From 0a8449b07c48477d97b6252e67562abdd466cf37 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Wed, 2 Feb 2022 11:39:53 +0100 Subject: [PATCH] broadcom/compiler: fix offset alignment for ldunifa when skipping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Part-of: --- src/broadcom/compiler/nir_to_vir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 56635f0a69e..9149b304c7b 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -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; } }