[Mesa-dev] [PATCH 1/2] radv: check if addrlib enabled HTILE in radv_image_can_enable_htile()

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed Dec 12 13:15:52 UTC 2018


When hile_size is 0, we can't enable HTILE. This doesn't change
anything, except not calling radv_image_alloc_htile().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_image.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 090ca70a327..b1044639fdf 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -931,7 +931,8 @@ 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 &&
+	return radv_image_has_htile(image) &&
+	       image->info.levels == 1 &&
 	       vk_format_is_depth(image->vk_format) &&
 	       image->info.width * image->info.height >= 8 * 8;
 }
-- 
2.20.0



More information about the mesa-dev mailing list