Mesa (main): turnip: Disable buffer texturing on 422 formats.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 24 17:50:45 UTC 2021
Module: Mesa
Branch: main
Commit: ea5707c52f5e45f16ef554ee3d9fe2d3f318dae5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea5707c52f5e45f16ef554ee3d9fe2d3f318dae5
Author: Emma Anholt <emma at anholt.net>
Date: Wed Jun 23 14:37:55 2021 -0700
turnip: Disable buffer texturing on 422 formats.
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 | 2 --
src/freedreno/vulkan/tu_formats.c | 17 +++++++++++++----
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/freedreno/ci/deqp-freedreno-a630-fails.txt b/src/freedreno/ci/deqp-freedreno-a630-fails.txt
index e54c56a08af..860e659a4d7 100644
--- a/src/freedreno/ci/deqp-freedreno-a630-fails.txt
+++ b/src/freedreno/ci/deqp-freedreno-a630-fails.txt
@@ -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
diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c
index 576626be599..ad0ddb0d32c 100644
--- a/src/freedreno/vulkan/tu_formats.c
+++ b/src/freedreno/vulkan/tu_formats.c
@@ -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
More information about the mesa-commit
mailing list