From 582a791980ff5da5f9cbd791088deaeaa9b62646 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Thu, 14 May 2026 16:20:39 +0800 Subject: [PATCH] pvr: return FORMAT_NOT_SUPPORTED for unknown image types VK_KHR_maintenance5 requires the driver to accept values beyond the defined enumerants for physical-device-level functions. Although the VkImageType enumeration hasn't received any new enumerants since VK_VERSION_1_0, it's possible that it gets extended in the future. Change the code to return a VK_ERROR_FORMAT_NOT_SUPPORTED instead of using UNREACHABLE (which triggers an assert). Signed-off-by: Icenowy Zheng Reviewed-by: Frank Binns Part-of: --- src/imagination/vulkan/pvr_formats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/imagination/vulkan/pvr_formats.c b/src/imagination/vulkan/pvr_formats.c index 7e557cdcad9..5d5a6d982d9 100644 --- a/src/imagination/vulkan/pvr_formats.c +++ b/src/imagination/vulkan/pvr_formats.c @@ -743,7 +743,8 @@ pvr_get_image_format_properties(struct pvr_physical_device *pdevice, break; default: - UNREACHABLE("Invalid image type."); + result = vk_error(pdevice, VK_ERROR_FORMAT_NOT_SUPPORTED); + goto err_unsupported_format; } /* The spec says maxMipLevels may be 1 when tiling is VK_IMAGE_TILING_LINEAR