The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Simon Zeni and committed by
Rylie Pavlik
cf9fe171 22313d4c

+7
+7
src/xrt/auxiliary/vk/vk_helpers.c
··· 1195 1195 * For AHardwareBuffer handles, the alloc size must be the size returned by 1196 1196 * vkGetAndroidHardwareBufferPropertiesANDROID for the Android hardware buffer 1197 1197 */ 1198 + } else if (requirements.size == 0) { 1199 + /* 1200 + * VUID-VkMemoryAllocateInfo-allocationSize-07899 1201 + * For any handles other than AHardwareBuffer, size must be greater than 0 1202 + */ 1203 + VK_ERROR(vk, "size must be greater than 0"); 1204 + 1198 1205 } else if (requirements.size > image_native->size) { 1199 1206 VK_ERROR(vk, "size mismatch, exported %" PRIu64 " but requires %" PRIu64, image_native->size, 1200 1207 requirements.size);