nir: handle edge flags in nir_create_passthrough_gs

`nir_create_passthrough_gs` will now take a boolean argument to decide
whether it needs to handle edgeflags.

When true is passed it will output a line strip where edges that
shouldn't be visible are not emitted.

This is usefull because geometry shaders will generally throw away
edgeflags so for a passthrough GS to act transparently it needs to emulate them.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>
This commit is contained in:
antonino
2023-02-02 17:30:05 +01:00
committed by Marge Bot
parent a0751e8088
commit 24535ffb3d
3 changed files with 22 additions and 7 deletions
+2 -1
View File
@@ -5086,7 +5086,8 @@ nir_shader * nir_create_passthrough_tcs(const nir_shader_compiler_options *optio
const nir_shader *vs, uint8_t patch_vertices);
nir_shader * nir_create_passthrough_gs(const nir_shader_compiler_options *options,
const nir_shader *prev_stage,
enum shader_prim primitive_type);
enum shader_prim primitive_type,
bool emulate_edgeflags);
bool nir_lower_fragcolor(nir_shader *shader, unsigned max_cbufs);
bool nir_lower_fragcoord_wtrans(nir_shader *shader);