Description
If an application waits on a swapchain image by calling
xrWaitSwapchainImage in a session created using
XrGraphicsBindingVulkanKHR, and that call returns XR_SUCCESS or
XR_SESSION_LOSS_PENDING, then the OpenXR runtime must guarantee that
the following conditions are true, keeping in mind that the runtime must
not access the VkQueue in xrWaitSwapchainImage:
-
The image has a memory layout compatible with
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALfor color images, orVK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMALfor depth images. -
The
VkQueuespecified in XrGraphicsBindingVulkanKHR has ownership of the image.
When an application releases a swapchain image by calling xrReleaseSwapchainImage, in a session created using XrGraphicsBindingVulkanKHR, the OpenXR runtime must interpret the image as:
-
Having a memory layout compatible with
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALfor color images, orVK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMALfor depth images. -
Being owned by the
VkQueuespecified in XrGraphicsBindingVulkanKHR.
The application is responsible for transitioning the swapchain image back to the image layout and queue ownership that the OpenXR runtime requires. If the image is not in a layout compatible with the above specifications the runtime may exhibit undefined behavior.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.