Mesa (main): broadcom/compiler: fix offset alignment for ldunifa when skipping
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 3 07:55:52 UTC 2022
Module: Mesa
Branch: main
Commit: 0a8449b07c48477d97b6252e67562abdd466cf37
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a8449b07c48477d97b6252e67562abdd466cf37
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Wed Feb 2 11:39:53 2022 +0100
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 at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14830>
---
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;
}
}
More information about the mesa-commit
mailing list