From de45fc8d804bf3462867e1765e82e5dab2f2b257 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 2 Feb 2023 18:24:03 -0800 Subject: [PATCH] turnip: move a comment about FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8 Part-of: --- src/freedreno/fdl/fd6_view.c | 4 ++++ src/freedreno/vulkan/tu_image.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/freedreno/fdl/fd6_view.c b/src/freedreno/fdl/fd6_view.c index 1e22b0d710a..e6a75a756c5 100644 --- a/src/freedreno/fdl/fd6_view.c +++ b/src/freedreno/fdl/fd6_view.c @@ -226,6 +226,10 @@ fdl6_view_init(struct fdl6_view *view, const struct fdl_layout **layouts, swap = WZYX; } + /* FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8 is broken without UBWC on a630. We + * don't need it without UBWC anyway because the purpose of the format is + * UBWC-compatibility. + */ if (texture_format == FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8 && !ubwc_enabled) texture_format = FMT6_8_8_8_8_UNORM; diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c index 0197ddc4bba..9c21aa66ebe 100644 --- a/src/freedreno/vulkan/tu_image.c +++ b/src/freedreno/vulkan/tu_image.c @@ -353,9 +353,6 @@ ubwc_possible(struct tu_device *device, * * If we wish to get the border colors correct without knowing the format * when creating the sampler, we also have to use the A630 workaround. - * - * Additionally, the special AS_R8G8B8A8 format is broken without UBWC, - * so we have to fallback to 8_8_8_8_UNORM when UBWC is disabled */ if (!use_z24uint_s8uint && format == VK_FORMAT_D24_UNORM_S8_UINT &&