nvk: Allow sparse binding of YCbCr images

We support sparse binding, just not sparse residency.  While we're here,
we change the check to plane_count > 1, which is the real requirement.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35843>
This commit is contained in:
Faith Ekstrand 2025-06-30 13:56:00 -04:00 committed by Marge Bot
parent 13afd66d78
commit d396544fe1

View file

@ -592,9 +592,12 @@ nvk_GetPhysicalDeviceImageFormatProperties2(
(pImageFormatInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT))
return VK_ERROR_FORMAT_NOT_SUPPORTED;
/* We don't support sparse residency for multi-plane images. While we
* could probably support sparse for VK_FORMAT_B8G8R8G8_422_UNORM, we
* disable it because the standard block sizes are funky.
*/
if (ycbcr_info &&
((pImageFormatInfo->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) ||
(pImageFormatInfo->flags & VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT)))
(pImageFormatInfo->flags & VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT))
return VK_ERROR_FORMAT_NOT_SUPPORTED;
if ((pImageFormatInfo->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) &&