mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 01:58:16 +02:00
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 <zhengxingda@iscas.ac.cn> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
This commit is contained in:
parent
bd496a6aad
commit
582a791980
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue