Monado OpenXR Runtime
d3d_d3d11_helpers.cpp File Reference

Misc D3D11 helper routines. More...

#include "d3d_d3d11_helpers.hpp"
#include "util/u_logging.h"
#include <dxgi1_6.h>
#include <d3d11_4.h>
#include <wil/com.h>
#include <wil/result.h>
#include <vector>
Include dependency graph for d3d_d3d11_helpers.cpp:

Functions

HRESULT xrt::auxiliary::d3d::d3d11::tryCreateDevice (const wil::com_ptr< IDXGIAdapter > &adapter, D3D_DRIVER_TYPE driver_type, unsigned int creation_flags, const std::vector< D3D_FEATURE_LEVEL > &feature_levels, wil::com_ptr< ID3D11Device > &out_device, wil::com_ptr< ID3D11DeviceContext > &out_context)
 
std::pair< wil::com_ptr< ID3D11Device >, wil::com_ptr< ID3D11DeviceContext > > xrt::auxiliary::d3d::d3d11::createDevice (const wil::com_ptr< IDXGIAdapter > &adapter=nullptr, u_logging_level log_level=U_LOGGING_INFO)
 Create a D3D11 Device object. More...
 

Detailed Description

Misc D3D11 helper routines.

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

Function Documentation

◆ createDevice()

std::pair< wil::com_ptr< ID3D11Device >, wil::com_ptr< ID3D11DeviceContext > > xrt::auxiliary::d3d::d3d11::createDevice ( const wil::com_ptr< IDXGIAdapter > &  adapter = nullptr,
u_logging_level  log_level = U_LOGGING_INFO 
)

Create a D3D11 Device object.

Parameters
adapteroptional: adapter to create on.
log_levelThe level to compare against for internal log messages
Exceptions
wil::ResultExceptionin case of error
Returns
std::pair<wil::com_ptr<ID3D11Device>, wil::com_ptr<ID3D11DeviceContext>>

References xrt::auxiliary::d3d::d3d11::createDevice().

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