Mesa (staging/19.0): radv: do not use gfx fast depth clears for layered depth/stencil images

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 4 16:15:28 UTC 2019


Module: Mesa
Branch: staging/19.0
Commit: 871c79ed0b83e5a2c96d69d7c779f5cc3616a1ce
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=871c79ed0b83e5a2c96d69d7c779f5cc3616a1ce

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon Jun  3 17:52:56 2019 +0200

radv: do not use gfx fast depth clears for layered depth/stencil images

The driver should only fast depth clears with the graphics path
when the view covers all image layers, otherwise this might
corrupt layers when HTILE is enabled.

Cc: 19.0 19.1 mesa-stable at lists.freedesktop.org
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit 8a35eb0602735194f2976000ddff9dca2c8b5741)

---

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

diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index 32af736fd8f..051dcbc7c76 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -650,6 +650,7 @@ static bool depth_view_can_fast_clear(struct radv_cmd_buffer *cmd_buffer,
 	if (radv_image_has_htile(iview->image) &&
 	    iview->base_mip == 0 &&
 	    iview->base_layer == 0 &&
+	    iview->layer_count == iview->image->info.array_size &&
 	    radv_layout_is_htile_compressed(iview->image, layout, queue_mask) &&
 	    radv_image_extent_compare(iview->image, &iview->extent))
 		return true;




More information about the mesa-commit mailing list