lavapipe: skip format checks for EXTENDED_USAGE

we can effectively skip any kind of checks here and just assume that one
of two scenarios is in effect:
* the user is about to attempt some incredibly illegal behavior that VVL will catch
* the user is about to attempt a pro gamer move and we'll be fine

in either case, it's EXTENDED_USAGE, so hopefully we're about to make a texture
view from a compatible and supported format

cc: mesa-stable

fixes:
dEQP-VK.image.extended_usage_bit_compatibility.image_format_properties*

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15320>
This commit is contained in:
Mike Blumenkrantz 2022-03-09 14:26:19 -05:00 committed by Marge Bot
parent c40dc39b5a
commit 6a4c7ef728

View file

@ -230,6 +230,9 @@ static VkResult lvp_get_image_format_properties(struct lvp_physical_device *phys
break;
}
if (info->flags & VK_IMAGE_CREATE_EXTENDED_USAGE_BIT)
goto skip_checks;
if (info->usage & VK_IMAGE_USAGE_SAMPLED_BIT) {
if (!(format_feature_flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) {
goto unsupported;
@ -273,6 +276,7 @@ static VkResult lvp_get_image_format_properties(struct lvp_physical_device *phys
}
}
skip_checks:
*pImageFormatProperties = (VkImageFormatProperties) {
.maxExtent = maxExtent,
.maxMipLevels = maxMipLevels,