From 587311f64564a2332f93fef6986f75125c760c39 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 8 Feb 2023 13:26:57 +1000 Subject: [PATCH] hasvk: anv: set Y tiling for video decode images The video decode hw only works with Y tiled images. --- src/intel/vulkan_hasvk/anv_formats.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/vulkan_hasvk/anv_formats.c b/src/intel/vulkan_hasvk/anv_formats.c index ad3365b..11b7c70 100644 --- a/src/intel/vulkan_hasvk/anv_formats.c +++ b/src/intel/vulkan_hasvk/anv_formats.c @@ -984,6 +984,12 @@ anv_get_image_format_properties( isl_mod_info = isl_drm_modifier_get_info(vk_mod_info->drmFormatModifier); if (isl_mod_info == NULL) goto unsupported; + + /* only allow Y tiling for video decode. */ + if (info->usage & VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR) { + if (isl_mod_info->tiling != ISL_TILING_Y0) + goto unsupported; + } } assert(format->vk_format == info->format);