From 0513ff6564170f7749f533ab87ccfc5013d819dd Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 24 Jan 2022 11:49:19 +0200 Subject: [PATCH] anv: verify that the format supports multisampling We tightened the requirements for multisampling on Gfx7 but didn't format that at the Vulkan level. This will break more conformance tests on Gfx7, but we weren't conformant anyway. Signed-off-by: Lionel Landwerlin Fixes: 531b1b7511af ("intel/isl: Strengthen MCS SINT format restriction") Reviewed-by: Nanley Chery Part-of: --- src/intel/vulkan/anv_formats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index abaa6a46540..1bf60182967 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -1108,7 +1108,8 @@ anv_get_image_format_properties( (format_feature_flags & (VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR | VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR)) && !(info->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) && - !(info->usage & VK_IMAGE_USAGE_STORAGE_BIT)) { + !(info->usage & VK_IMAGE_USAGE_STORAGE_BIT) && + isl_format_supports_multisampling(devinfo, format->planes[0].isl_format)) { sampleCounts = isl_device_get_sample_counts(&physical_device->isl_dev); }