From 409e15f26fd245dfa6645214c433cfe4e7b9a988 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 16 Jan 2018 18:02:37 +1100 Subject: [PATCH] ac: fix nir_intrinsic_get_buffer_size for radeonsi MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- 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 25ce06138ba..1dc64f87cc9 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2404,9 +2404,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) -- 2.30.2