radv: check if addrlib enabled HTILE in radv_image_can_enable_htile()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 12 Dec 2018 13:15:52 +0000 (14:15 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 13 Dec 2018 08:21:19 +0000 (09:21 +0100)
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@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_image.c

index 79e9ada011af03a7ca11f903d6d1a78e6380edae..0ac3d837fdb3ec56df4ab95ff067ee083e10b48f 100644 (file)
@@ -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;
 }