KhronosGroup / KhronosGroup/OpenXR-SDK-Source

Want to know about how does OpenXR manage/destroy Vulkan resources.

Open
#377 7 comments 0 reactions 0 assignees View on GitHub
runtime related synced to gitlab waiting for reporter
Dominant language
Python
Stars
825
Forks
306
Avg merge
1d 23h
Merged PRs (30d)
1

Description

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](https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/211#issue-714361996) 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)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the hello-xr demo's VulkanGraphicsPlugin and its m_vkDevice field, then review the validation-layer output supplied in the comments. Trace which Vulkan objects are created or destroyed around the logical device and compare that behavior with the linked issue. Done means the ownership and required destruction order are documented or the suspected resource-lifetime bug is confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.