anv: Don't enable compression with modifiers (xe2)

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29906>
This commit is contained in:
Jianxun Zhang 2024-04-16 20:08:26 -07:00 committed by Marge Bot
parent 66fa1c5ddd
commit 0b75f89f57

View file

@ -2017,8 +2017,16 @@ anv_image_is_pat_compressible(struct anv_device *device, struct anv_image *image
* the VkImageCreateInfo structure passed to vkCreateImage.
*/
/* TODO: check for other compression requirements and return true */
return false;
/* There are no compression-enabled modifiers on Xe2, and all legacy
* modifiers are not defined with compression. We simply disable
* compression on all modifiers.
*
* We disable this in anv_AllocateMemory() as well.
*/
if (image->vk.tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
return false;
return true;
}
void