anv: Allow modifiers on depth images
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

The compressed and uncompressed Tile4 modifiers are supported on Xe2+.
The uncompressed TileY and Tile4 modifiers are easily supported on older
platforms.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38095>
This commit is contained in:
Nanley Chery 2025-10-27 14:17:45 -04:00 committed by Marge Bot
parent 5a05a39e56
commit aa86530056

View file

@ -681,10 +681,22 @@ anv_get_image_format_features2(const struct anv_physical_device *physical_device
const VkImageAspectFlags aspects = vk_format_aspects(vk_format);
if (aspects & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
if (vk_tiling == VK_IMAGE_TILING_LINEAR ||
vk_tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
if (vk_tiling == VK_IMAGE_TILING_LINEAR)
return 0;
if (vk_tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
if (aspects != VK_IMAGE_ASPECT_DEPTH_BIT)
return 0;
if (isl_mod_info->tiling != ISL_TILING_Y0 &&
isl_mod_info->tiling != ISL_TILING_4)
return 0;
if (devinfo->ver <= 12 &&
isl_drm_modifier_has_aux(isl_mod_info->modifier))
return 0;
}
flags |= VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT |
VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT |
VK_FORMAT_FEATURE_2_BLIT_SRC_BIT |