From 9133bbf18611204b2000d89e47b469a3de8d556a Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 12 Nov 2018 17:57:10 +0100 Subject: [PATCH] radv: check allowed fast HTILE clears a bit earlier Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_meta_clear.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index b9ae66695c2..4d8a6a91602 100644 --- a/src/amd/vulkan/radv_meta_clear.c +++ b/src/amd/vulkan/radv_meta_clear.c @@ -821,6 +821,11 @@ emit_fast_htile_clear(struct radv_cmd_buffer *cmd_buffer, if (clear_rect->layerCount != iview->image->info.array_size) return false; + if (!(aspects & VK_IMAGE_ASPECT_DEPTH_BIT) || + ((vk_format_aspects(iview->image->vk_format) & VK_IMAGE_ASPECT_STENCIL_BIT) && + !(aspects & VK_IMAGE_ASPECT_STENCIL_BIT))) + return false; + if (!radv_is_fast_clear_depth_allowed(clear_value) || !(aspects & VK_IMAGE_ASPECT_DEPTH_BIT)) return false; -- 2.30.2