Mesa (master): radv/ac: correctly size shared memory usage.

Dave Airlie airlied at kemper.freedesktop.org
Fri Feb 3 19:53:37 UTC 2017


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Feb  3 01:46:24 2017 +0000

radv/ac: correctly size shared memory usage.

We count the number of slots used, but slots are vec4 sized,
so we have to scale by 16 not 4.

Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Cc: "17.0" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/common/ac_nir_to_llvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index ddec74f..9be6e77 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4812,7 +4812,7 @@ LLVMModuleRef ac_translate_nir_to_llvm(LLVMTargetMachineRef tm,
 				idx++;
 			}
 
-			shared_size *= 4;
+			shared_size *= 16;
 			var = LLVMAddGlobalInAddressSpace(ctx.module,
 							  LLVMArrayType(ctx.i8, shared_size),
 							  "compute_lds",




More information about the mesa-commit mailing list