diff options
author | Samuel Pitoiset <[email protected]> | 2018-11-12 17:57:10 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-11-19 16:32:14 +0100 |
commit | 9133bbf18611204b2000d89e47b469a3de8d556a (patch) | |
tree | 7024ab8deb9b897defad4943f445c48b4198c38a /src/amd/vulkan | |
parent | 193ad4748b006c54c619aa47f3a50fccd27bb2c2 (diff) |
radv: check allowed fast HTILE clears a bit earlier
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_meta_clear.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |