From 0b75f89f5781657846288fe59d162e2586b0cf82 Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Tue, 16 Apr 2024 20:08:26 -0700 Subject: [PATCH] anv: Don't enable compression with modifiers (xe2) Signed-off-by: Jianxun Zhang Reviewed-by: Nanley Chery Part-of: --- src/intel/vulkan/anv_image.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 6e49432d50d..7264968076e 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -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