zink: create another samplerview for shadow textures
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 6 Jan 2023 15:38:22 +0000 (10:38 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 24 Jan 2023 08:30:09 +0000 (08:30 +0000)
commitb6518f3ba5955f254c462f6c48eef64b54083a27
treec9682eb01d425aec7909c942688ac413cdc9b52a
parentc46fb43473eb4ab65ee64530cd63e2013d9f8f04
zink: create another samplerview for shadow textures

when doing legacy depth texture mode sampling, it's necessary to keep
another view that has the right (R in component 0) swizzle so that depth
values can actually be returned in cases where it would otherwise be
a constant value due to swizzling

this also allows zink_sampler_view::shadow_needs_shader_swizzle to be removed

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