[Mesa-dev] [PATCH 4/6] radv: check allowed fast HTILE clears a bit earlier
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Nov 12 16:57:10 UTC 2018
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
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 47030549a5..5beb4cd7be 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.19.1
More information about the mesa-dev
mailing list