Skip to content

Fix Vulkan resource cleanup in hello_xr - #612

Open
HussainAther wants to merge 1 commit into
KhronosGroup:mainfrom
HussainAther:fix/hello-xr-vulkan-cleanup
Open

Fix Vulkan resource cleanup in hello_xr#612
HussainAther wants to merge 1 commit into
KhronosGroup:mainfrom
HussainAther:fix/hello-xr-vulkan-cleanup

Conversation

@HussainAther

Copy link
Copy Markdown

Summary

Add explicit cleanup for Vulkan resources owned by VulkanGraphicsPlugin.

The destructor now:

  • waits for the Vulkan device to become idle
  • releases swapchain image and rendering resources
  • destroys the draw semaphore
  • resets the memory allocator
  • destroys the Vulkan device
  • destroys the debug messenger
  • destroys the Vulkan instance
  • clears the associated Vulkan handles

This prevents hello_xr from leaking its Vulkan device and instance and allows validation layers to report resource leaks more accurately.

Fixes #211.

Testing

  • cmake --build build
  • ctest --test-dir build

Result:

100% tests passed, 0 tests failed out of 1

@CLAassistant

CLAassistant commented Jul 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@HussainAther
HussainAther force-pushed the fix/hello-xr-vulkan-cleanup branch from 2ff0bf6 to 17ce484 Compare July 19, 2026 22:34
@rpavlik-bot rpavlik-bot added the synced to gitlab Synchronized to OpenXR internal GitLab label Jul 20, 2026
@rpavlik-bot

Copy link
Copy Markdown
Collaborator

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

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

@johnkearney

Copy link
Copy Markdown

This looks like a good change to me but as I compare it to the equivalent code in the conformance test suite I'm seeing divergence. Generally we've tried to keep these inline - if there's a way to keep them more similar that'd be great. But generally LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

synced to gitlab Synchronized to OpenXR internal GitLab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hello_xr does not gracefully clean up Vulkan device/instance

4 participants