Mesa (master): radv: remove redundant check in depth_view_can_fast_clear()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 20 17:32:56 UTC 2021


Module: Mesa
Branch: master
Commit: 4eec0fb55c1b5476aca302c27c57c0597542a3f0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4eec0fb55c1b5476aca302c27c57c0597542a3f0

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Jan 19 17:54:13 2021 +0100

radv: remove redundant check in depth_view_can_fast_clear()

We check below if HTILE is in compressed state, so checking if
the image has HTILE is useless because radv_layout_is_htile_compressed()
will return FALSE if no HTILE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8579>

---

 src/amd/vulkan/radv_meta_clear.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index dd9283b1e0b..62c7215c7cb 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -699,8 +699,7 @@ static bool depth_view_can_fast_clear(struct radv_cmd_buffer *cmd_buffer,
 	      clear_value.depth != 1.0) ||
 	     ((aspects & VK_IMAGE_ASPECT_STENCIL_BIT) && clear_value.stencil != 0)))
 		return false;
-	if (radv_image_has_htile(iview->image) &&
-	    iview->base_mip == 0 &&
+	if (iview->base_mip == 0 &&
 	    iview->base_layer == 0 &&
 	    iview->layer_count == iview->image->info.array_size &&
 	    radv_layout_is_htile_compressed(cmd_buffer->device, iview->image, layout, in_render_loop, queue_mask) &&



More information about the mesa-commit mailing list