From 8197d744f5324af52ab0fcbbd67f66f7b6172f16 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 23 Nov 2024 17:57:08 +0100 Subject: [PATCH] radv: Do not overwrite VRS rates when doing fast clears Fixes a whole bunch of VRS tests on navi24. cc: mesa-stable Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/meta/radv_meta_clear.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/amd/vulkan/meta/radv_meta_clear.c b/src/amd/vulkan/meta/radv_meta_clear.c index 3a9b314526e..fe0b5fda9b3 100644 --- a/src/amd/vulkan/meta/radv_meta_clear.c +++ b/src/amd/vulkan/meta/radv_meta_clear.c @@ -820,6 +820,11 @@ radv_get_htile_mask(struct radv_cmd_buffer *cmd_buffer, const struct radv_image if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) mask |= 0x000003f0; + if (radv_image_has_vrs_htile(device, image)) { + mask &= ~(0x3 << 6); /* VRS X-rate */ + mask &= ~(0x3 << 10); /* VRS Y-rate */ + } + if (cmd_buffer->qf == RADV_QUEUE_TRANSFER) { /* Clear both aspects on SDMA, it's not ideal but there is no other way to initialize the * HTILE buffer.