From 805ef6cc17130f6c9af99ea3fc6a44426c53158a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 27 Jun 2025 13:36:44 -0400 Subject: [PATCH] nir: add intrinsics for geometry shader lowering Signed-off-by: Alyssa Rosenzweig Reviewed-by: Mary Guillemard Part-of: --- src/compiler/nir/nir_intrinsics.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index b75c35f2fe5..b329d81faef 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -1375,6 +1375,13 @@ intrinsic("cmat_insert", src_comp=[-1, 1, -1, 1]) intrinsic("cmat_copy", src_comp=[-1, -1]) intrinsic("cmat_transpose", src_comp=[-1, -1]) +# Select an output vertex in a poly GS. Takes the stream-local vertex ID. +intrinsic("select_vertex_poly", src_comp=[1], indices=[STREAM_ID]) + +# Emit a primitive (a point list, a line strip, or a triangle strip). +# Sources: (index offset, first vertex, number of vertices, # of XFB primitives before). +intrinsic("emit_primitive_poly", src_comp=[1, 1, 1, 1], indices=[STREAM_ID]) + # IR3-specific version of most SSBO intrinsics. The only different # compare to the originals is that they add an extra source to hold # the dword-offset, which is needed by the backend code apart from