nir/passthrough_gs: Correctly set vertices_in
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 18 Aug 2023 17:10:37 +0000 (13:10 -0400)
committerMarge Bot <emma+marge@anholt.net>
Sat, 19 Aug 2023 17:13:49 +0000 (17:13 +0000)
commitfe4208ed4c9a08c7963caa287ae34e9357de68af
treebceaf024dead46a3d3b139d4691ff48cb256909f
parent04ba4059b7243fb9258df12154ce1e7a01e019c8
nir/passthrough_gs: Correctly set vertices_in

If the input primitive has adjacency, the output primitive will have fewer
vertices than the input. For example, if we input TRIANGLE_STRIPS_ADJACENCY, we
need to set vertices_in = 6 even though we'll output TRIANGLE_STRIPS with
vertices_out = 3. Respect that, in order to correctly handle adjacency inputs.

Fixes: ea14579f3dc ("nir: handle primitives with adjacency")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24780>
src/compiler/nir/nir_passthrough_gs.c