[Mesa-dev] [PATCH] radv/ac: correctly size shared memory usage.

Edward O'Callaghan funfunctor at folklore1984.net
Fri Feb 3 02:37:09 UTC 2017


Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 02/03/2017 12:47 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> We count the number of slots used, but slots are vec4 sized,
> so we have to scale by 16 not 4.
> 
> 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",
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170203/045fc58a/attachment.sig>


More information about the mesa-dev mailing list