From eb0034fe285c242a7fcf0c97aa67916c984594ec Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 12 Dec 2018 14:15:52 +0100 Subject: [PATCH] radv: check if addrlib enabled HTILE in radv_image_can_enable_htile() 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 Reviewed-by: Bas Nieuwenhuizen --- 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 79e9ada011a..0ac3d837fdb 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -932,7 +932,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.30.2