anv: check requirements for VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE

Somehow I missed this one in 164c0951a0

If the format the image is being created with doesn't have the FSR
format feature, report it as unsupported.

Also fixes future CTS tests: dEQP-VK.api.info.unsupported_image_usage.*

Cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28913>
This commit is contained in:
Iván Briano
2024-04-24 14:48:10 -07:00
committed by Marge Bot
parent 497672ac74
commit 8ebf07eccd

View File

@@ -1078,6 +1078,12 @@ anv_format_supports_usage(
}
}
if (usage_flags & VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR) {
if (!(format_feature_flags & VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR)) {
return false;
}
}
return true;
}