Mesa (staging/20.1): radv: replace discard with demote for Quantic Dream games

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


Module: Mesa
Branch: staging/20.1
Commit: e2686628e1eef596151070670c65844f0acb799b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e2686628e1eef596151070670c65844f0acb799b

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Jul 20 16:54:22 2020 +0100

radv: replace discard with demote for Quantic Dream games

Detroit: Become Human uses dFdx/dFdy immediately after a quad-divergent
discard, which can cause the image to become white.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Cc: <mesa-stable at lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3212
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5991>
(cherry picked from commit d9072a113b2041cebfa10e6e27b5ce2687a02126)

---

 .pick_status.json            | 2 +-
 src/amd/vulkan/radv_device.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index f95846dbf9d..48acd98575a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -292,7 +292,7 @@
         "description": "radv: replace discard with demote for Quantic Dream games",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 78fdcbc047a..810b9e90c5b 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -556,7 +556,8 @@ radv_handle_per_app_options(struct radv_instance *instance,
 			instance->debug_flags |= RADV_DEBUG_ZERO_VRAM;
 		} else if (!strcmp(engine_name, "Quantic Dream Engine")) {
 			/* Fix various artifacts in Detroit: Become Human */
-			instance->debug_flags |= RADV_DEBUG_ZERO_VRAM;
+			instance->debug_flags |= RADV_DEBUG_ZERO_VRAM |
+			                         RADV_DEBUG_DISCARD_TO_DEMOTE;
 		}
 	}
 



More information about the mesa-commit mailing list