From: Timothy Arceri Date: Tue, 27 Feb 2018 01:47:00 +0000 (+1100) Subject: ac: add support for handling nir_intrinsic_load_vertex_id X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5504bebfc419f93b54ca92f36d27c2f8b82bc552;p=mesa.git ac: add support for handling nir_intrinsic_load_vertex_id This will be used by radeonsi. Reviewed-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 96bbecd1100..253c440a328 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4395,6 +4395,10 @@ static void visit_intrinsic(struct ac_nir_context *ctx, case nir_intrinsic_load_local_group_size: result = ctx->abi->load_local_group_size(ctx->abi); break; + case nir_intrinsic_load_vertex_id: + result = LLVMBuildAdd(ctx->ac.builder, ctx->abi->vertex_id, + ctx->abi->base_vertex, ""); + break; case nir_intrinsic_load_vertex_id_zero_base: { result = ctx->abi->vertex_id; break;