turnip: fix resolve MSAA D32_SFLOAT_S8_UINT image to S8_UINT
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 13 Jan 2021 08:06:51 +0000 (08:06 +0000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Feb 2021 16:51:02 +0000 (16:51 +0000)
commit57238876765017ae8c3217f702e67cb1cbcc4008
treef10504d6029f67bf9744311e3f7ab5cf07b891c8
parent09e9be3d8f5aee0819fe2a5bb9d8f598f3b0d842
turnip: fix resolve MSAA D32_SFLOAT_S8_UINT image to S8_UINT

According to VK_KHR_depth_stencil_resolve spec (see
VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03182):

"If the VkFormat of pDepthStencilResolveAttachment has a stencil
component, then the VkFormat of pDepthStencilAttachment must have a
stencil component with the same number of bits and numerical
type"

The issue with D32_SFLOAT_S8_UINT format is that it is implemented as
two planes, so we need to execute the separate_stencil path in
tu_emit_blit() to resolve its stencil component into S8_UINT image.

Fixes the following tests:

dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.compatibility_depth_zero_stencil_zero_testing_stencil
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8527>
src/freedreno/vulkan/tu_clear_blit.c