summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2018-12-12 14:15:52 +0100
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2018-12-13 09:21:19 +0100
commiteb0034fe285c242a7fcf0c97aa67916c984594ec (patch)
treeacbba040f5abb24e6f196713deb51387e7bb71ec /src/amd/vulkan
parentd8325f1f07b67c8a31c6786c71e3fd0910bc3b82 (diff)
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 <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_image.c3
1 files changed, 2 insertions, 1 deletions
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;
}