Monado OpenXR Runtime
d3d_d3d11_allocator.hpp File Reference

Higher-level D3D11-backed image buffer allocation routine. More...

#include "xrt/xrt_compositor.h"
#include <Unknwn.h>
#include <d3d11_3.h>
#include <d3d11_4.h>
#include <wil/com.h>
#include <wil/resource.h>
#include <vector>
Include dependency graph for d3d_d3d11_allocator.hpp:

Go to the source code of this file.

Functions

xrt_result_t xrt::auxiliary::d3d::d3d11::allocateSharedImages (ID3D11Device5 &device, const xrt_swapchain_create_info &xsci, size_t image_count, bool keyed_mutex, std::vector< wil::com_ptr< ID3D11Texture2D1 > > &out_images, std::vector< HANDLE > &out_handles)
 Allocate images (ID3D11Texture2D1) that have a corresponding native handle. More...
 

Detailed Description

Higher-level D3D11-backed image buffer allocation routine.

Author
Rylie Pavlik rylie.nosp@m..pav.nosp@m.lik@c.nosp@m.olla.nosp@m.bora..nosp@m.com

Function Documentation

◆ allocateSharedImages()

xrt_result_t xrt::auxiliary::d3d::d3d11::allocateSharedImages ( ID3D11Device5 &  device,
const xrt_swapchain_create_info xsci,
size_t  image_count,
bool  keyed_mutex,
std::vector< wil::com_ptr< ID3D11Texture2D1 > > &  out_images,
std::vector< HANDLE > &  out_handles 
)

Allocate images (ID3D11Texture2D1) that have a corresponding native handle.

Parameters
deviceA D3D device to allocate with.
xsciSwapchain create info: note that the format is assumed to be a DXGI_FORMAT (conversion to typeless is automatic)
image_countThe number of images to create.
keyed_mutexWhether to create images with a shared "keyed mutex" as well
[out]out_imagesA vector that will be cleared and populated with the images.
[out]out_handlesA vector that will be cleared and populated with the corresponding native handles.
Returns
xrt_result_t, one of:

References xrt::auxiliary::d3d::d3d11::allocateSharedImages(), XRT_ERROR_SWAPCHAIN_FLAG_VALID_BUT_UNSUPPORTED, XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT, and XRT_SWAPCHAIN_CREATE_STATIC_IMAGE.

Referenced by xrt::auxiliary::d3d::d3d11::allocateSharedImages().