Mesa (master): turnip: disable tiling for NV12/IYUV formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 21 21:21:18 UTC 2020


Module: Mesa
Branch: master
Commit: 8fff8afb1343c934b4212ee1b0517dd2045a5c8c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8fff8afb1343c934b4212ee1b0517dd2045a5c8c

Author: Jonathan Marek <jonathan at marek.ca>
Date:   Wed Jul  8 21:00:07 2020 -0400

turnip: disable tiling for NV12/IYUV formats

The last change to my previous MR to disable UBWC for the formats ended up
breaking a few tests for A640 at least, because tiled-but-not-UBWC can be
broken in some cases.

Fixes: 1a83279da57f2e ("turnip: enable 420_UNORM formats")

Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5817>

---

 src/freedreno/vulkan/tu_image.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c
index 6bcfc913008..9087806fe47 100644
--- a/src/freedreno/vulkan/tu_image.c
+++ b/src/freedreno/vulkan/tu_image.c
@@ -154,10 +154,16 @@ tu_image_create(VkDevice _device,
     * For IYUV, the blob doesn't use UBWC, but it seems to work, but
     * disable it since we don't know if a special UBWC format is needed
     * like NV12
+    *
+    * Disable tiling completely, because we set the TILE_ALL bit to
+    * match the blob, however fdl expects the TILE_ALL bit to not be
+    * set for non-UBWC tiled formats
     */
    if (image->vk_format == VK_FORMAT_G8_B8R8_2PLANE_420_UNORM ||
-       image->vk_format == VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM)
+       image->vk_format == VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM) {
+      tile_mode = TILE6_LINEAR;
       ubwc_enabled = false;
+   }
 
    /* don't use UBWC with compressed formats */
    if (vk_format_is_compressed(image->vk_format))



More information about the mesa-commit mailing list