From 6a4c7ef7286f50b5396ffc68bcf6ad33eb67de07 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 9 Mar 2022 14:26:19 -0500 Subject: [PATCH] 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 Part-of: --- src/gallium/frontends/lavapipe/lvp_formats.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_formats.c b/src/gallium/frontends/lavapipe/lvp_formats.c index b30853a..6831a65 100644 --- a/src/gallium/frontends/lavapipe/lvp_formats.c +++ b/src/gallium/frontends/lavapipe/lvp_formats.c @@ -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, -- 2.7.4