gallium/tgsi_exec: Fix up NumOutputs counting
authorEric Anholt <eric@anholt.net>
Tue, 25 Aug 2020 23:01:47 +0000 (16:01 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 2 Sep 2020 16:59:17 +0000 (09:59 -0700)
commit329dee14555b8c8da59e6b47a51050f2aa736596
tree73a05d69f0a607b3d46e3557c4e3486d7529bc8a
parented745febe1c05352459869e4f67bdf6e1d2a1d0c
gallium/tgsi_exec: Fix up NumOutputs counting

We can get duplicate declarations for an index (for example dvec3 + float
packed into 2 vec4s, the second one won't pack into the first's array
decl), and we'd end up stepping by the wrong amount in GS vtx/prim emit.

Fixes vs-gs-fs-double, sso-vs-gs-fs-array-interleave piglit tests.

Fixes: 49155c3264d0 ("draw/tgsi: fix geometry shader input/output swizzling")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6567>
src/gallium/auxiliary/tgsi/tgsi_exec.c