Mesa (master): radv: disable HTILE for very small depth surfaces

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 1 08:21:29 UTC 2018


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Sep 28 16:28:50 2018 +0200

radv: disable HTILE for very small depth surfaces

Like we disable DCC/CMASK for small color surfaces as well.
Serious Sam 2017 creates a 1x1 depth surface and I think
it should be faster to do slow clears on the graphics queue
instead of fast clears on compute, and eventually a depth
expand if the surface isn't TC-compatible HTILE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/amd/vulkan/radv_image.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index b316242dc5..65a62fb991 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -906,7 +906,9 @@ radv_image_can_enable_fmask(struct radv_image *image)
 static inline bool
 radv_image_can_enable_htile(struct radv_image *image)
 {
-	return image->info.levels == 1 && vk_format_is_depth(image->vk_format);
+	return image->info.levels == 1 &&
+	       vk_format_is_depth(image->vk_format) &&
+	       image->info.width * image->info.height >= 8 * 8;
 }
 
 VkResult




More information about the mesa-commit mailing list