Description

All valid XrSwapchainUsageFlags values passed in a session created using XrGraphicsBindingD3D12KHR must be interpreted as follows by the runtime, so that the returned swapchain images used by the application may be used as if they were created with the corresponding D3D12_RESOURCE_FLAGS flags and heap type. The runtime may set additional resource flags but must not restrict usage.

XrSwapchainUsageFlagBits Corresponding D3D12 resource flag bits

XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT

D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET

XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT

D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL

XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT

D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS

XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT

ignored

XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT

ignored

XR_SWAPCHAIN_USAGE_SAMPLED_BIT omitted

D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE

XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT

ignored

XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_KHR (Added by XR_KHR_swapchain_usage_input_attachment_bit and only available when that extension is enabled)

ignored

All D3D12 swapchain textures are created with D3D12_HEAP_TYPE_DEFAULT heap type.

See Also

No cross-references are available

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 2014-2025 The Khronos Group Inc.