radv: fix image format properties with fragment shading rate usage

This was missing and this caused test failures for formats different
than VK_FORMAT_R8_UINT which is the only one supported for FSR.

Fixes recent
dEQP-VK.api.info.unsupported_image_usage.*.fragment_shading_rate_attachment.*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28893>
(cherry picked from commit e8d94536d2)
This commit is contained in:
Samuel Pitoiset 2024-04-24 10:00:57 +02:00 committed by Eric Engestrom
parent e65cf53979
commit e1332ee978
2 changed files with 6 additions and 1 deletions

View file

@ -2534,7 +2534,7 @@
"description": "radv: fix image format properties with fragment shading rate usage",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1480,6 +1480,11 @@ radv_get_image_format_properties(struct radv_physical_device *physical_device,
}
}
if (image_usage & VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR) {
if (!(format_feature_flags & VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR))
goto unsupported;
}
/* Sparse resources with multi-planar formats are unsupported. */
if (info->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) {
if (vk_format_get_plane_count(format) > 1)