OpenXR-SDK-Source
OpenXR-SDK-Source copied to clipboard
Want to know about how does OpenXR manage/destroy Vulkan resources.
Vulkan version: 1.3
In my application, when I try to destroy the Vulkan logical device, the validation layer complains that a bunch of objects has not been destroyed yet. I spent an entire day trying to properly destroy the resources until I realized that these objects were not created by me at all. Then they must be created by OpenXR I think since it's the only part of my code that interact with Vulkan.
And I also found an #issue saying that the hello-xr demo doesn't destroy the Vulkan device manually. And it is true indeed. So I tried to add a destructor for the VulkanGraphicsPlugin class. And as a result, the validation layer complained the same thing (maybe not completely the same) as it does in my application.
I don't understand how OpenXR manages these Vulkan objects, maybe it's a bug, or maybe I just shouldn't destroy the Vulkan logical device myself, and OpenXR can handle this for me, so I'm asking here.
Here's the validation layer output from hello-xr after manually destroying m_vkDevice field:
(This output is not correct so I deleted it, look at those I posted in the comment)