turnip: Swizzle in 0, 1 for D24S8 STENCIL_ASPECT sampling.

This seems to be what is expected by the CTS, but I haven't found a
citation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13009>
This commit is contained in:
Emma Anholt 2021-09-23 17:26:49 -07:00 committed by Marge Bot
parent 464f0ed74b
commit 0e997d42a2
2 changed files with 8 additions and 7 deletions

View File

@ -67,11 +67,6 @@ dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_si
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_geom,Fail
dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_vert,Fail
dEQP-VK.texture.filtering.2d.formats.d24_unorm_s8_uint_stencil.nearest,Fail
dEQP-VK.texture.filtering.2d_array.formats.d24_unorm_s8_uint_stencil.d24_unorm_s8_uint_stencil_nearest,Fail
dEQP-VK.texture.filtering.cube.formats.d24_unorm_s8_uint_stencil.nearest,Fail
dEQP-VK.texture.filtering.unnormal.formats.d24_unorm_s8_uint_stencil.nearest,Fail
# Broken on all drivers: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4582
dEQP-VK.wsi.display_control.register_device_event,Fail

View File

@ -136,11 +136,17 @@ tu6_texswiz(const VkComponentMapping *comps,
case VK_FORMAT_D24_UNORM_S8_UINT:
if (aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT) {
if (!has_z24uint_s8uint) {
/* using FMT6_8_8_8_8_UINT */
/* using FMT6_8_8_8_8_UINT, so need to pick out the W channel and
* swizzle (0,0,1) in the rest (see "Conversion to RGBA").
*/
swiz[0] = A6XX_TEX_W;
swiz[1] = A6XX_TEX_ZERO;
swiz[2] = A6XX_TEX_ZERO;
swiz[3] = A6XX_TEX_ONE;
} else {
/* using FMT6_Z24_UINT_S8_UINT */
/* using FMT6_Z24_UINT_S8_UINT, which is (d, s, 0, 1), so need to
* swizzle away the d.
*/
swiz[0] = A6XX_TEX_Y;
swiz[1] = A6XX_TEX_ZERO;
}