zink: process non-optimal-key passes first
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 17 Nov 2022 11:15:54 +0000 (12:15 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 1 Dec 2022 10:21:02 +0000 (10:21 +0000)
commit09ced773fce790245f3c76e1eec5549199242f04
treea5c9a2e79ba49a238beca5917509e39e685cc3f2
parent81fcbfae748a012cf7b3fc62d9c866ed7901db25
zink: process non-optimal-key passes first

Right now, it's only the vertex-shader that needs special handling for
non-optimal keys. That makes it possible to use fallthrough to always
end up in the last-vertex-stage conditional.

But we're about to add special handling for the geometry stage as well,
so let's prepare by splitting the switch-statement in two; one that only
happens for non-optimal keys, and does all the needed processing there,
and one that deals with the rest.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19117>
src/gallium/drivers/zink/zink_compiler.c