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.haeh...@amd.com>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev