From: Samuel Pitoiset Date: Mon, 12 Nov 2018 16:57:10 +0000 (+0100) Subject: radv: check allowed fast HTILE clears a bit earlier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9133bbf18611204b2000d89e47b469a3de8d556a;p=mesa.git radv: check allowed fast HTILE clears a bit earlier Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- 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;