From b1c7064a6841c327294760d6a8536b1441a2b519 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 7 May 2025 14:31:27 +0200 Subject: [PATCH] radv: ignore radv_disable_dcc_stores on GFX12 It's not necessary because DCC is completely transparent to the userspace driver. Also it's causing issues with scanout. This fixes rendering issues with scanout in Indiana Jones. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12924 Signed-off-by: Samuel Pitoiset Part-of: (cherry picked from commit b7d2cdd2b42c4a25eca42b609abb91db00013042) --- .pick_status.json | 2 +- src/amd/vulkan/radv_formats.c | 3 ++- src/amd/vulkan/radv_image.c | 3 ++- src/util/driconf.h | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 30d1ebb7185..8c2a2f24160 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5004,7 +5004,7 @@ "description": "radv: ignore radv_disable_dcc_stores on GFX12", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 5023694773f..f6a1d6c45ec 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -632,7 +632,8 @@ radv_get_modifier_flags(struct radv_physical_device *pdev, VkFormat format, uint * do not support DCC image stores or when explicitly disabled. */ if (!ac_modifier_supports_dcc_image_stores(pdev->info.gfx_level, modifier) || - radv_is_atomic_format_supported(format) || instance->drirc.disable_dcc_stores) + radv_is_atomic_format_supported(format) || + (instance->drirc.disable_dcc_stores && pdev->info.gfx_level < GFX12)) features &= ~VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT; if (instance->debug_flags & (RADV_DEBUG_NO_DCC | RADV_DEBUG_NO_DISPLAY_DCC)) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index f3832aa008b..03b9e4796d4 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -298,7 +298,8 @@ radv_use_dcc_for_image_early(struct radv_device *device, struct radv_image *imag return false; /* Force disable DCC for stores to workaround game bugs. */ - if (instance->drirc.disable_dcc_stores && (pCreateInfo->usage & VK_IMAGE_USAGE_STORAGE_BIT)) + if (instance->drirc.disable_dcc_stores && pdev->info.gfx_level < GFX12 && + (pCreateInfo->usage & VK_IMAGE_USAGE_STORAGE_BIT)) return false; /* DCC MSAA can't work on GFX10.3 and earlier without FMASK. */ diff --git a/src/util/driconf.h b/src/util/driconf.h index d46947b3bac..8e1fbb1bf15 100644 --- a/src/util/driconf.h +++ b/src/util/driconf.h @@ -753,7 +753,7 @@ #define DRI_CONF_RADV_DISABLE_DCC_STORES(def) \ DRI_CONF_OPT_B(radv_disable_dcc_stores, def, \ - "Disable DCC for color storage images") + "Disable DCC for color storage images on GFX10-GFX11.5") #define DRI_CONF_RADV_LOWER_TERMINATE_TO_DISCARD(def) \ DRI_CONF_OPT_B(radv_lower_terminate_to_discard, def, \