tu: Fix stencil border color with has_z24uint_s8uint
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 21 Jun 2022 22:08:49 +0000 (00:08 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 29 Jun 2022 03:00:56 +0000 (03:00 +0000)
commit8183a728a201f9d4b66a0b371f196b64e432484f
tree6f373c7d64d339f5b00a4bdccb8cdaaa9e00dfcd
parent74d09cac98fc9980b0c16907369397d51a7282e6
tu: Fix stencil border color with has_z24uint_s8uint

On a650+ we use the new Z24UINT_S8UINT format to sample the stencil
aspect of D24S8, which returns stencil in the second component and also
uses the second integer component for the border color. However Vulkan
mandates that the first component is used for the stencil border color.
There's no workaround we know of, so we have to fall back to the old
behavior where there is a workaround. If we know the format, we can
fixup the border color ourselves though.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17177>
src/freedreno/fdl/fd6_view.c
src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_formats.c
src/freedreno/vulkan/tu_image.c
src/freedreno/vulkan/tu_private.h