From d68b2db89ca38f3f6c0d3ebd65945c471d864d58 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Mon, 24 Jan 2022 18:53:37 -0500 Subject: [PATCH] anv: Disable CCS_E for some 8/16bpp copies on TGL+ CCS_E is currently disabled on TGL+, but we'll enable it soon. We choose to explicitly disable it for certain copy operations to avoid CTS failures in the following groups: - dEQP-VK.drm_format_modifiers.export_import.* - dEQP-VK.synchronization* Fixes: e6147895885 ("anv: Also disallow CCS_E for multi-LOD images") Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_image.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 4f74f7f750e..60025172630 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -2082,6 +2082,20 @@ anv_layout_to_aux_state(const struct intel_device_info * const devinfo, bool aux_supported = true; bool clear_supported = isl_aux_usage_has_fast_clears(aux_usage); + const struct isl_format_layout *fmtl = + isl_format_get_layout(image->planes[plane].primary_surface.isl.format); + + /* Disabling CCS for the following case avoids failures in: + * - dEQP-VK.drm_format_modifiers.export_import.* + * - dEQP-VK.synchronization* + */ + if (usage & (VK_IMAGE_USAGE_TRANSFER_DST_BIT | + VK_IMAGE_USAGE_TRANSFER_SRC_BIT) && fmtl->bpb <= 16 && + aux_usage == ISL_AUX_USAGE_CCS_E && devinfo->ver >= 12) { + aux_supported = false; + clear_supported = false; + } + if ((usage & VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT) && !read_only) { /* This image could be used as both an input attachment and a render * target (depth, stencil, or color) at the same time and this can cause