C Specification

XrSwapchainUsageFlags Specify the intended usage of the swapchain images. When images are created, the runtime needs to know how the images are used in a way that requires more information than simply the image format. The XrSwapchainCreateInfo passed to xrCreateSwapchain should match the intended usage or else undefined behavior may result when the application works with the images.

Flags include:

// Flag bits for XrSwapchainUsageFlags
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT = 0x00000001;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000002;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT = 0x00000004;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT = 0x00000008;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT = 0x00000010;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_SAMPLED_BIT = 0x00000020;
static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT = 0x00000040;

Description

Flag Descriptions
  • XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT indicates that the image may be a color rendering target.

  • XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT indicates that the image may be a depth/stencil rendering target.

  • XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT indicates that the image may be used as data source.

  • XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT indicates that the image may be the source of a copy operation.

  • XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT indicates that the image may be the destination of a copy operation.

  • XR_SWAPCHAIN_USAGE_SAMPLED_BIT indicates that the image may sampled by a shader.

  • XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT indicates that the image format may be reinterpreted.

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.