From f11a4a09b02bd976940f42aaef38c8415a4bd8d4 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 13 Apr 2023 16:07:16 +0200 Subject: [PATCH] radv: try to keep HTILE compressed for READ_ONLY_OPTIMAL layout It should be handled like DEPTH_STENCIL_READ_ONLY_OPTIMAL. This fixes an issue with VRS attachment because HTILE was considered disabled for READ_ONLY_OPTIMAL but there is no reasons to disable it as long as the image is only used as a depth/stencil attachment. Otherwise, when HTILE is disabled, VRS rates are ignored. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8675 Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index cf3df948ecb..2dca1dec417 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -2384,6 +2384,7 @@ radv_layout_is_htile_compressed(const struct radv_device *device, const struct r */ return false; case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL: + case VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL: if (radv_image_is_tc_compat_htile(image) || (radv_image_has_htile(image) && !(image->vk.usage & (VK_IMAGE_USAGE_SAMPLED_BIT |