zink: refactor swizzle-clamping code
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 14 Sep 2022 12:03:51 +0000 (14:03 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 23 Sep 2022 10:55:15 +0000 (10:55 +0000)
commit09afab4c290ee834e80934df99a181dec5341e7d
tree45e4ec3058c83abadf302ae1793454fe7343b819
parent51c7691108bd98ce6bcdbc0fef61d9ec969018ae
zink: refactor swizzle-clamping code

It's going to be a lot easier to work on this if we can use loops
instead of open-coding. So let's move the swizzles into arrays, process
them, and then stick it back into their place at the end.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18596>
src/gallium/drivers/zink/zink_context.c