[Mesa-dev] [PATCH 1/2] ac: add support for handling nir_intrinsic_load_vertex_id
Timothy Arceri
tarceri at itsqueeze.com
Tue Feb 27 02:10:36 UTC 2018
This will be used by radeonsi.
---
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 c277ed5322..0e38b0b370 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.14.3
More information about the mesa-dev
mailing list