nir: Add ability to count emitted GS primitives.
Add an option to nir_lower_gs_intrinsics which tells it to track the number of emitted primitives, not just vertices. Additionally, also make it per-stream. Also rename the set_vertex_count intrinsic to set_vertex_and_primitive_count. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
This commit is contained in:
@@ -352,7 +352,8 @@ intrinsic("end_primitive", indices=[STREAM_ID])
|
||||
# unsigned integer source.
|
||||
intrinsic("emit_vertex_with_counter", src_comp=[1], indices=[STREAM_ID])
|
||||
intrinsic("end_primitive_with_counter", src_comp=[1], indices=[STREAM_ID])
|
||||
intrinsic("set_vertex_count", src_comp=[1])
|
||||
# Contains the final total vertex and primitive counts
|
||||
intrinsic("set_vertex_and_primitive_count", src_comp=[1, 1], indices=[STREAM_ID])
|
||||
|
||||
# Atomic counters
|
||||
#
|
||||
|
Reference in New Issue
Block a user