xrt: Add all remaining swapchain creation flags

This commit is contained in:
Jakob Bornecrantz 2020-07-29 14:44:15 +01:00
parent 080fdacc70
commit 9ae720b9d4
2 changed files with 7 additions and 0 deletions

View file

@ -55,6 +55,9 @@ typedef uint64_t VkDeviceMemory;
*/
enum xrt_swapchain_create_flags
{
//! Our compositor just ignores this bit.
XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT = (1 << 0),
//! Signals that the allocator should only allocate one image.
XRT_SWAPCHAIN_CREATE_STATIC_IMAGE = (1 << 1),
};

View file

@ -155,6 +155,10 @@ static enum xrt_swapchain_create_flags
convert_create_flags(XrSwapchainCreateFlags xr_flags)
{
enum xrt_swapchain_create_flags flags = 0;
if ((xr_flags & XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT) != 0) {
flags |= XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT;
}
if ((xr_flags & XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT) != 0) {
flags |= XRT_SWAPCHAIN_CREATE_STATIC_IMAGE;
}