radv: disable TC-compat HTILE in GENERAL for Detroit: Become Human

The game has invalid usage of render loops and enabling TC-compat
HTILE in GENERAL introduces rendering issues.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3063
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8359>
This commit is contained in:
Samuel Pitoiset 2021-01-07 08:38:01 +01:00 committed by Marge Bot
parent 8f9b2afe70
commit 52b6adfbfb
3 changed files with 11 additions and 1 deletions

View file

@ -619,6 +619,14 @@ radv_handle_per_app_options(struct radv_instance *instance,
/* Fix various artifacts in Detroit: Become Human */
instance->debug_flags |= RADV_DEBUG_ZERO_VRAM |
RADV_DEBUG_DISCARD_TO_DEMOTE;
/* Fix rendering issues in Detroit: Become Human
* because the game uses render loops (it
* samples/renders from/to the same depth/stencil
* texture inside the same draw) without input
* attachments and that is invalid Vulkan usage.
*/
instance->disable_tc_compat_htile_in_general = true;
}
}

View file

@ -1841,7 +1841,8 @@ bool radv_layout_is_htile_compressed(const struct radv_device *device,
*/
if (radv_image_is_tc_compat_htile(image) &&
queue_mask & (1u << RADV_QUEUE_GENERAL) &&
!in_render_loop) {
!in_render_loop &&
!device->instance->disable_tc_compat_htile_in_general) {
/* GFX10+ supports compressed writes to HTILE. */
return device->physical_device->rad_info.chip_class >= GFX10 ||
!(image->usage & VK_IMAGE_USAGE_STORAGE_BIT);

View file

@ -360,6 +360,7 @@ struct radv_instance {
* Workarounds for game bugs.
*/
bool enable_mrt_output_nan_fixup;
bool disable_tc_compat_htile_in_general;
};
VkResult radv_init_wsi(struct radv_physical_device *physical_device);