radv/ac: correctly size shared memory usage.
authorDave Airlie <airlied@redhat.com>
Fri, 3 Feb 2017 01:46:24 +0000 (01:46 +0000)
committerDave Airlie <airlied@redhat.com>
Fri, 3 Feb 2017 19:52:13 +0000 (19:52 +0000)
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@folklore1984.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c

index ddec74fa1ab0aed0432ac26701357f5fb089fe47..9be6e77f86b94ed338d488f37dee3547d3eb2a3c 100644 (file)
@@ -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",