From: Rhys Perry Date: Mon, 20 Jul 2020 15:54:22 +0000 (+0100) Subject: radv: replace discard with demote for Quantic Dream games X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9072a113b2041cebfa10e6e27b5ce2687a02126;p=mesa.git 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 Reviewed-by: Daniel Schürmann Reviewed-by: Samuel Pitoiset Cc: Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3212 Part-of: --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 53a6a3d4309..b9969e4e5eb 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -571,7 +571,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; } }