mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
anv: Allow modifiers on depth images
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:
parent
5a05a39e56
commit
aa86530056
1 changed files with 14 additions and 2 deletions
|
|
@ -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 |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue