ac: handle cast derefs

Just give back the same value for now.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Dave Airlie 2018-11-19 14:16:16 +10:00
parent baa4bdd3a6
commit 3486fe655a
1 changed files with 3 additions and 0 deletions

View File

@ -3730,6 +3730,9 @@ 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_cast:
result = get_src(ctx, instr->parent);
break;
default:
unreachable("Unhandled deref_instr deref type");
}