Mesa (master): radeonsi: raise the alignment of LDS memory for compute shaders

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 13 00:40:14 UTC 2019


Module: Mesa
Branch: master
Commit: aa737e858050239c263b06d2646f9977876b5ba2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa737e858050239c263b06d2646f9977876b5ba2

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Sat May  4 12:37:36 2019 +0200

radeonsi: raise the alignment of LDS memory for compute shaders

This implies that the memory will always be at address 0, which allows
LLVM to generate slightly better code.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/radeonsi/si_shader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 3617214ebef..ed2db3d0042 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2217,7 +2217,7 @@ void si_declare_compute_memory(struct si_shader_context *ctx)
 	                                  LLVMArrayType(ctx->i8, lds_size),
 	                                  "compute_lds",
 	                                  AC_ADDR_SPACE_LDS);
-	LLVMSetAlignment(var, 4);
+	LLVMSetAlignment(var, 64 * 1024);
 
 	ctx->ac.lds = LLVMBuildBitCast(ctx->ac.builder, var, i8p, "");
 }




More information about the mesa-commit mailing list