From: Bas Nieuwenhuizen Date: Thu, 24 Jan 2019 00:21:28 +0000 (+0100) Subject: amd/common: Handle nir_deref_type_ptr_as_array for shared memory. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=830fd0efc1ae58d722d8efa4b95f708cf70b23ca;p=mesa.git amd/common: Handle nir_deref_type_ptr_as_array for shared memory. Fixes: a2b5cc3c399 "radv: enable variable pointers" Reviewed-by: Samuel Pitoiset --- 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;