From 830fd0efc1ae58d722d8efa4b95f708cf70b23ca Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Thu, 24 Jan 2019 01:21:28 +0100 Subject: [PATCH] amd/common: Handle nir_deref_type_ptr_as_array for shared memory. Fixes: a2b5cc3c399 "radv: enable variable pointers" Reviewed-by: Samuel Pitoiset --- src/amd/common/ac_nir_to_llvm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 3a830591a24..ab3db270f0c 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3844,6 +3844,10 @@ static void visit_deref(struct ac_nir_context *ctx, result = ac_build_gep0(&ctx->ac, get_src(ctx, instr->parent), get_src(ctx, instr->arr.index)); break; + case nir_deref_type_ptr_as_array: + result = ac_build_gep_ptr(&ctx->ac, get_src(ctx, instr->parent), + get_src(ctx, instr->arr.index)); + break; case nir_deref_type_cast: result = get_src(ctx, instr->parent); break; -- 2.30.2