ea9f19ac7b
Funcion anv_get_image_format_properties() can get called from two different Vulkan entry points: - anv_GetPhysicalDeviceImageFormatProperties2 - anv_GetPhysicalDeviceSparseImageFormatProperties2 While there is a sparse-named function aimed specifically at sparse images, you can call vkGetPhysicalDeviceImageFormatProperties2 passing sparse flags in VkPhysicalDeviceImageFormatInfo2::flags. And when that happens, we need to detect it and properly either return VK_ERROR_FORMAT_NOT_SUPPORTED or properly set props->imageFormatProperties->sampleCounts with a value that matches the sparse usage. This change affects our behavior in 3 types of cases: color MSAA cases, depth/stencil MSAA cases and atomic_emulated cases. The previous patches should have covered these cases, so everything should be passing now. v2: Rebase. v3: Reword the commit message. v4: Rebase and reword the commit message. Testcase: dEQP-VK.api.info.sparse_image_format_properties2.2d.optimal.r16g16_unorm Testcase: dEQP-VK.api.info.image_format_properties.2d.optimal.d16_unorm Testcase: dEQP-VK.api.info.image_format_properties.2d.optimal.r64_uint Reviewed-by: Iván Briano <ivan.briano@intel.com> (v1) Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35524>