zink: workaround undefined swizzle 1 for z/s textures
authorSoroushIMG <soroush.kashani@imgtec.com>
Sat, 25 Feb 2023 22:24:00 +0000 (22:24 +0000)
committerMarge Bot <emma+marge@anholt.net>
Tue, 14 Mar 2023 17:03:30 +0000 (17:03 +0000)
commit24a2530ed8cec3d7998a8d34f567d6e23d83ae45
tree3b0eb1b0ddda8d56a555491f79bd9a003a758df8
parent2cf117ee39fb06d6752a0c4bba19a5cb8cee3ca9
zink: workaround undefined swizzle 1 for z/s textures

using swizzle 1 with z/s textures returns undefined data
on some Imagination hardware.
Work around this by using the same shader swizzling used for
shadow samplers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21571>
src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_program.c
src/gallium/drivers/zink/zink_program.h