The xrWaitSwapchainImage function is defined as:
// Provided by XR_VERSION_1_0 XrResult xrWaitSwapchainImage( XrSwapchain swapchain, const XrSwapchainImageWaitInfo* waitInfo);
Before an application begins writing to a swapchain image, it must first wait on the image, to avoid writing to it before the compositor has finished reading from it. xrWaitSwapchainImage will implicitly wait on the oldest acquired swapchain image which has not yet been successfully waited on. Once a swapchain image has been successfully waited on without timeout, the app must release before waiting on the next acquired swapchain image.
This function may block for longer than the timeout specified in XrSwapchainImageWaitInfo due to scheduling or contention.
If the timeout expires without the image becoming available for writing,
XR_TIMEOUT_EXPIRED must be returned.
If xrWaitSwapchainImage returns
XR_TIMEOUT_EXPIRED, the next
call to xrWaitSwapchainImage will wait on the same image index again
until the function succeeds with
Note that this is not an error code;
The runtime must eventually relinquish ownership of a swapchain image to the application and must not block indefinitely.
The runtime must return
XR_ERROR_CALL_ORDER_INVALID if no image has
been acquired by calling xrAcquireSwapchainImage.
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 2014-2023 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.