Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan validation errors. #371

Open
Onhi opened this issue Jan 3, 2023 · 4 comments
Open

Vulkan validation errors. #371

Onhi opened this issue Jan 3, 2023 · 4 comments
Labels
runtime related a problem/question for a runtime, not OpenXR itself synced to gitlab Synchronized to OpenXR internal GitLab

Comments

@Onhi
Copy link

Onhi commented Jan 3, 2023

I get vulkan validation error while using OpenXR.

For exemple:

VUID-VkImageCreateInfo-pNext-01443(ERROR / SPEC): msgNum: 416909302 - Validation Error: [ VUID-VkImageCreateInfo-pNext-01443 ] Object 0: handle = 0x2cda8774080, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x18d987f6 | vkCreateImage: VkImageCreateInfo pNext chain includes VkExternalMemoryImageCreateInfo with handleTypes 16 but pCreateInfo->initialLayout is VK_IMAGE_LAYOUT_PREINITIALIZED. The Vulkan spec states: If the pNext chain includes a VkExternalMemoryImageCreateInfo or VkExternalMemoryImageCreateInfoNV structure whose handleTypes member is not 0, initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED (https://vulkan.lunarg.com/doc/view/1.3.231.1/windows/1.3-extensions/vkspec.html#VUID-VkImageCreateInfo-pNext-01443)
    Objects: 1
       [0]  0x2cda8774080, type: 3, name: NULL

I'm still new to this so I get that this might not be from OpenXR but from the runtime I am using?

@rpavlik
Copy link
Contributor

rpavlik commented Jan 4, 2023

Does this happen with hello XR or just your own software?

@Onhi
Copy link
Author

Onhi commented Jan 4, 2023

Yes, here are the ones I noticed running hello_xr.


HelloXr -g Vulkan -ff Hmd -vc Stereo -bm Opaque -s Stage -v


VUID-vkCreateDevice-ppEnabledExtensionNames-01387(ERROR / SPEC): msgNum: 307460652 - Validation Error: [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object 0: handle = 0x29ad8049310, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x12537a2c | Missing extension required by the device extension VK_KHR_external_semaphore: VK_KHR_external_semaphore_capabilities. The Vulkan spec states: All required device extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list (https://vulkan.lunarg.com/doc/view/1.3.231.1/windows/1.3-extensions/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)
    Objects: 1
       [0]  0x29ad8049310, type: 1, name: NULL

+		[0]	0x0000029ad638ef70 "VK_KHR_external_memory"	const char * const
+		[1]	0x0000029ad638ef87 "VK_KHR_external_semaphore"	const char * const
+		[2]	0x0000029ad638efa1 "VK_KHR_dedicated_allocation"	const char * const
+		[3]	0x0000029ad638efbd "VK_KHR_get_memory_requirements2"	const char * const
+		[4]	0x0000029ad638efdd "VK_KHR_external_memory_win32"	const char * const
+		[5]	0x0000029ad638effa "VK_KHR_win32_keyed_mutex"	const char * const
+		[6]	0x0000029ad638f013 "VK_EXT_debug_marker"	const char * const
+		[7]	0x00007ff67305fac0 "VK_KHR_swapchain"	const char * const

VUID-VkImageCreateInfo-pNext-01443(ERROR / SPEC): msgNum: 416909302 - Validation Error: [ VUID-VkImageCreateInfo-pNext-01443 ] Object 0: handle = 0x1fc371cc5d0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x18d987f6 | vkCreateImage: VkImageCreateInfo pNext chain includes VkExternalMemoryImageCreateInfo with handleTypes 16 but pCreateInfo->initialLayout is VK_IMAGE_LAYOUT_PREINITIALIZED. The Vulkan spec states: If the pNext chain includes a VkExternalMemoryImageCreateInfo or VkExternalMemoryImageCreateInfoNV structure whose handleTypes member is not 0, initialLayout must be VK_IMAGE_LAYOUT_UNDEFINED (https://vulkan.lunarg.com/doc/view/1.3.231.1/windows/1.3-extensions/vkspec.html#VUID-VkImageCreateInfo-pNext-01443)
    Objects: 1
       [0]  0x1fc371cc5d0, type: 3, name: NULL

> extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame(
>     XrSession                                   session,
>     const XrFrameEndInfo*                       frameEndInfo) XRLOADER_ABI_TRY {
>     LoaderInstance* loader_instance;
>     XrResult result = ActiveLoaderInstance::Get(&loader_instance, "xrEndFrame");
>     if (XR_SUCCEEDED(result)) {
>>>       result = loader_instance->DispatchTable()->EndFrame(session, frameEndInfo);
>     }
>     return result;
> }
> XRLOADER_ABI_CATCH_FALLBACK

@Onhi
Copy link
Author

Onhi commented Jan 4, 2023

I should also point out that I could not find where vkDestroyDevice is called in hello_xr. This is another line that triggers a validation error in my own software.

VUID-vkDestroyDevice-device-00378(ERROR / SPEC): msgNum: 1901072314 - Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0x1b28114da10, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1b2d9ff4e80, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0x1b28114da10[], VkCommandBuffer 0x1b2d9ff4e80[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.3.231.1/windows/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
    Objects: 2
       [0]  0x1b28114da10, type: 3, name: NULL
       [1]  0x1b2d9ff4e80, type: 6, name: NULL

@rpavlik-bot rpavlik-bot added the synced to gitlab Synchronized to OpenXR internal GitLab label Feb 1, 2023
@rpavlik-bot
Copy link
Collaborator

An issue (number 1926) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#1926 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

@rpavlik rpavlik added the runtime related a problem/question for a runtime, not OpenXR itself label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime related a problem/question for a runtime, not OpenXR itself synced to gitlab Synchronized to OpenXR internal GitLab
Projects
None yet
Development

No branches or pull requests

3 participants