The driver should only fast depth clears with the graphics path
when the view covers all image layers, otherwise this might
corrupt layers when HTILE is enabled.

Cc: 19.0 19.1 mesa-sta...@lists.freedesktop.org
Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
 src/amd/vulkan/radv_meta_clear.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index 313e80d5cb7..44aaf92f53d 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -650,6 +650,7 @@ static bool depth_view_can_fast_clear(struct 
radv_cmd_buffer *cmd_buffer,
        if (radv_image_has_htile(iview->image) &&
            iview->base_mip == 0 &&
            iview->base_layer == 0 &&
+           iview->layer_count == iview->image->info.array_size &&
            radv_layout_is_htile_compressed(iview->image, layout, queue_mask) &&
            radv_image_extent_compare(iview->image, &iview->extent))
                return true;
-- 
2.21.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to