From 5504bebfc419f93b54ca92f36d27c2f8b82bc552 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 27 Feb 2018 12:47:00 +1100 Subject: [PATCH] ac: add support for handling nir_intrinsic_load_vertex_id MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This will be used by radeonsi. Reviewed-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- 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 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; -- 2.30.2