From b00921a8ffe3bb044010037b495d88408fcbc124 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: (cherry picked from commit f11a4a09b02bd976940f42aaef38c8415a4bd8d4) --- .pick_status.json | 2 +- src/amd/vulkan/radv_image.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 3ad4214f7c5..a38a98241d4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2844,7 +2844,7 @@ "description": "radv: try to keep HTILE compressed for READ_ONLY_OPTIMAL layout", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 6794b316c3b..8a53cd946c2 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -2323,6 +2323,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 |