mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
aux/vk: check image size not 0, when appropriate, in vk_create_image_from_native
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2332>
This commit is contained in:
parent
22313d4c9a
commit
cf9fe1716e
|
@ -1195,6 +1195,13 @@ vk_create_image_from_native(struct vk_bundle *vk,
|
|||
* For AHardwareBuffer handles, the alloc size must be the size returned by
|
||||
* vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer
|
||||
*/
|
||||
} else if (requirements.size == 0) {
|
||||
/*
|
||||
* VUID-VkMemoryAllocateInfo-allocationSize-07899
|
||||
* For any handles other than AHardwareBuffer, size must be greater than 0
|
||||
*/
|
||||
VK_ERROR(vk, "size must be greater than 0");
|
||||
|
||||
} else if (requirements.size > image_native->size) {
|
||||
VK_ERROR(vk, "size mismatch, exported %" PRIu64 " but requires %" PRIu64, image_native->size,
|
||||
requirements.size);
|
||||
|
|
Loading…
Reference in a new issue