turnip: Disable buffer texturing on 422 formats.
authorEmma Anholt <emma@anholt.net>
Wed, 23 Jun 2021 21:37:55 +0000 (14:37 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 24 Jun 2021 17:34:06 +0000 (17:34 +0000)
Fixes:
dEQP-VK.api.info.format_properties.g8b8g8r8_422_unorm
dEQP-VK.api.info.format_properties.b8g8r8g8_422_unorm

and part of:
dEQP-VK.api.info.format_properties.g8_b8_r8_3plane_420_unorm
dEQP-VK.api.info.format_properties.g8_b8r8_2plane_420_unorm

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11562>

src/freedreno/ci/deqp-freedreno-a630-fails.txt
src/freedreno/vulkan/tu_formats.c

index e54c56a..860e659 100644 (file)
@@ -17,8 +17,6 @@ dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit,F
 # likely-looking fixes in later versions of the loader.
 dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail,Fail
 
-dEQP-VK.api.info.format_properties.g8b8g8r8_422_unorm,Fail
-
 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9409
 dEQP-VK.compute.basic.max_local_size_x,Crash
 dEQP-VK.compute.basic.max_local_size_y,Crash
index 576626b..ad0ddb0 100644 (file)
@@ -450,15 +450,24 @@ tu_physical_device_get_format_properties(
    if (tu6_pipe2depth(format) != (enum a6xx_depth_format)~0)
       optimal |= VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT;
 
-   /* no tiling for special UBWC formats
-    * TODO: NV12 can be UBWC but has a special UBWC format for accessing the Y plane aspect
-    * for 3plane, tiling/UBWC might be supported, but the blob doesn't use tiling
-    */
    if (format == VK_FORMAT_G8B8G8R8_422_UNORM ||
        format == VK_FORMAT_B8G8R8G8_422_UNORM ||
        format == VK_FORMAT_G8_B8R8_2PLANE_420_UNORM ||
        format == VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM) {
+      /* no tiling for special UBWC formats
+       * TODO: NV12 can be UBWC but has a special UBWC format for accessing the Y plane aspect
+       * for 3plane, tiling/UBWC might be supported, but the blob doesn't use tiling
+       */
       optimal = 0;
+
+      /* Disable buffer texturing of subsampled (422) and planar YUV textures.
+       * The subsampling requirement comes from "If format is a block-compressed
+       * format, then bufferFeatures must not support any features for the
+       * format" plus the specification of subsampled as 2x1 compressed block
+       * format.  I couldn't find the citation for planar, but 1D access of
+       * planar YUV would be really silly.
+       */
+      buffer = 0;
    }
 
    /* D32_SFLOAT_S8_UINT is tiled as two images, so no linear format