nir: handle edge flags in nir_create_passthrough_gs
authorantonino <antonino.maniscalco@collabora.com>
Thu, 2 Feb 2023 16:30:05 +0000 (17:30 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 29 Mar 2023 19:18:40 +0000 (19:18 +0000)
commit24535ffb3d50b8c2245366e2ca9857fd38879cff
tree1ceb496398a648253e2a3afad6e10288561d46b5
parenta0751e8088d85bd13237e715715f4a0a08ad4175
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>
src/compiler/nir/nir.h
src/compiler/nir/nir_passthrough_gs.c
src/gallium/drivers/zink/zink_program.c