From b91d522bd2fdf637c676febe593cfe826ff66445 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 20 Jul 2020 16:54:22 +0100 Subject: [PATCH] radv: replace discard with demote for Quantic Dream games MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel Schürmann Reviewed-by: Samuel Pitoiset Cc: Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3212 Part-of: (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 2ddd4ac5a6f..892bca2c4bc 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -535,7 +535,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; } }