Mesa (main): broadcom/compiler: update comment on load_uniform fast-path
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 25 09:38:47 UTC 2022
Module: Mesa
Branch: main
Commit: 5cec8933846e633d33ebf6bd581d46583a308dd5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5cec8933846e633d33ebf6bd581d46583a308dd5
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Fri Jan 21 13:30:22 2022 +0100
broadcom/compiler: update comment on load_uniform fast-path
The comment for 16-bit applies to 8-bit uniforms as well.
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14648>
---
src/broadcom/compiler/nir_to_vir.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c
index 2a6fdbfb3d6..56635f0a69e 100644
--- a/src/broadcom/compiler/nir_to_vir.c
+++ b/src/broadcom/compiler/nir_to_vir.c
@@ -2648,11 +2648,12 @@ ntq_emit_load_uniform(struct v3d_compile *c, nir_intrinsic_instr *instr)
nir_src_as_uint(instr->src[0]));
/* Even though ldunif is strictly 32-bit we can still use it
- * to load scalar 16-bit uniforms so long as their offset is
- * 32-bit aligned. In this case, ldunif would still load 32-bit
- * into the destination with the 16-bit uniform data in the LSB
- * and garbage in the MSB, but that is fine because we don't
- * access the MSB of a 16-bit register.
+ * to load scalar 8-bit/16-bit uniforms so long as their offset
+ * is * 32-bit aligned. In this case, ldunif would still load
+ * 32-bit into the destination with the 8-bit/16-bit uniform
+ * data in the LSB and garbage in the MSB, but that is fine
+ * because we should only be accessing the valid bits of the
+ * destination.
*
* FIXME: if in the future we improve our register allocator to
* pack 2 16-bit variables in the MSB and LSB of the same
More information about the mesa-commit
mailing list