Mesa (main): radv: disable DCC for DOOM 2016 and Wolfenstein II

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 1 11:26:51 UTC 2021


Module: Mesa
Branch: main
Commit: 28e1b02a6f12e7a74b4f6970d226f8c9c01515a5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=28e1b02a6f12e7a74b4f6970d226f8c9c01515a5

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Jun 30 17:32:25 2021 +0200

radv: disable DCC for DOOM 2016 and Wolfenstein II

Both games perform two image layout transitions with the same image
in the same pipeline barrier with UNDEFINED and this re-initializes
DCC to the uncompressed state. No ideal solution sadly. Note that
both games declare all images as CONCURRENT.

This fixes rendering issues on GFX10+ because DCC for stores is
supported and this implicitly enables DCC for concurrent.

Fixes: da166f648f6 ("radv: enable DCC for concurrent images on GFX10")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4927
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4607
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11656>

---

 src/amd/vulkan/radv_device.c   |  4 ++++
 src/util/00-mesa-defaults.conf | 10 +++++++++-
 src/util/driconf.h             |  4 ++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index c1464c264d8..16bbb10f125 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -859,6 +859,7 @@ static const driOptionDescription radv_dri_options[] = {
       DRI_CONF_RADV_LOWER_DISCARD_TO_DEMOTE(false)
       DRI_CONF_RADV_INVARIANT_GEOM(false)
       DRI_CONF_RADV_DISABLE_TC_COMPAT_HTILE_GENERAL(false)
+      DRI_CONF_RADV_DISABLE_DCC(false)
    DRI_CONF_SECTION_END
 };
 // clang-format on
@@ -895,6 +896,9 @@ radv_init_dri_options(struct radv_instance *instance)
 
    if (driQueryOptionb(&instance->dri_options, "radv_invariant_geom"))
       instance->debug_flags |= RADV_DEBUG_INVARIANT_GEOM;
+
+   if (driQueryOptionb(&instance->dri_options, "radv_disable_dcc"))
+      instance->debug_flags |= RADV_DEBUG_NO_DCC;
 }
 
 VkResult
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index ec76b2a5d51..417fe43ebea 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -829,6 +829,14 @@ TODO: document the other workarounds.
 
         <application name="Monster Hunter World" application_name_match="MonsterHunterWorld.exe">
             <option name="radv_invariant_geom" value="true" />
-	</application>
+        </application>
+
+        <application name="DOOM (2016)" application_name_match="DOOMx64vk.exe">
+            <option name="radv_disable_dcc" value="true" />
+        </application>
+
+        <application name="Wolfenstein II" application_name_match="NewColossus_x64vk.exe">
+            <option name="radv_disable_dcc" value="true" />
+        </application>
     </device>
 </driconf>
diff --git a/src/util/driconf.h b/src/util/driconf.h
index 1c2515e2964..44e1d5bdd8b 100644
--- a/src/util/driconf.h
+++ b/src/util/driconf.h
@@ -509,4 +509,8 @@
    DRI_CONF_OPT_B(radv_disable_tc_compat_htile_general, def, \
                   "Disable TC-compat HTILE in GENERAL layout")
 
+#define DRI_CONF_RADV_DISABLE_DCC(def) \
+   DRI_CONF_OPT_B(radv_disable_dcc, def, \
+                  "Disable DCC for color images")
+
 #endif



More information about the mesa-commit mailing list