[Mesa-dev] [PATCH] ac: fix nir_intrinsic_get_buffer_size for radeonsi

Nicolai Hähnle nhaehnle at gmail.com
Wed Jan 17 11:13:09 UTC 2018


On 16.01.2018 08:02, Timothy Arceri wrote:
> ---
>   src/amd/common/ac_nir_to_llvm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 4a80748e4e..0940dc82d8 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2401,9 +2401,9 @@ static LLVMValueRef visit_load_push_constant(struct nir_to_llvm_context *ctx,
>   static LLVMValueRef visit_get_buffer_size(struct ac_nir_context *ctx,
>                                             const nir_intrinsic_instr *instr)
>   {
> -	LLVMValueRef ptr = get_src(ctx, instr->src[0]);
> +	LLVMValueRef index = get_src(ctx, instr->src[0]);
>   
> -	return get_buffer_size(ctx, LLVMBuildLoad(ctx->ac.builder, ptr, ""), false);
> +	return get_buffer_size(ctx, ctx->abi->load_ssbo(ctx->abi, index, false), false);
>   }
>   static void visit_store_ssbo(struct ac_nir_context *ctx,
>                                nir_intrinsic_instr *instr)
> 

Agreed that "index" makes more sense here, as it is an index in OpenGL.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list