nir,zink,asahi: support passing through gl_PrimitiveID

When this pass is used with Zink, gl_PrimitiveID needs to be passed
through, however this is unnecessary for other divers.

Analogous to previous commit

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397>
This commit is contained in:
Antonino Maniscalco
2024-11-29 00:22:37 +01:00
committed by Marge Bot
parent 23601d6632
commit 2b9738ce6d
4 changed files with 33 additions and 5 deletions
+2 -1
View File
@@ -6126,7 +6126,8 @@ nir_shader *nir_create_passthrough_gs(const nir_shader_compiler_options *options
enum mesa_prim primitive_type,
enum mesa_prim output_primitive_type,
bool emulate_edgeflags,
bool force_line_strip_out);
bool force_line_strip_out,
bool passthrough_prim_id);
bool nir_lower_fragcolor(nir_shader *shader, unsigned max_cbufs);
bool nir_lower_fragcoord_wtrans(nir_shader *shader);