From f40a7d3c93d186b3415227945fd2df00f81c7f4a Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 6 Jan 2021 16:19:21 +0100 Subject: [PATCH] radv: fix performance regression by restoring TC-compat HTILE in GENERAL This fixes a performance regression for games (eg. Youngblood) that declare all images as concurrent. This is likely buggy for compute queues but this just restores the previous behaviour for now. Fixes: f4f096805b0 ("radv: fix TC-compat HTILE images with DST_OPTIMAL on the compute queue") Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_image.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index ff51a07..c9f247a 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -1774,8 +1774,11 @@ bool radv_layout_is_htile_compressed(const struct radv_device *device, * depth pass because this allows compression and this reduces * the number of decompressions from/to GENERAL. */ + /* FIXME: Enabling TC-compat HTILE in GENERAL on the compute + * queue is likely broken for eg. depth/stencil copies. + */ if (radv_image_is_tc_compat_htile(image) && - queue_mask == (1u << RADV_QUEUE_GENERAL) && + queue_mask & (1u << RADV_QUEUE_GENERAL) && !in_render_loop) { /* GFX10+ supports compressed writes to HTILE. */ return device->physical_device->rad_info.chip_class >= GFX10 || -- 2.7.4