Monado OpenXR Runtime
d3d_dxgi_helpers.cpp File Reference

Misc D3D11 helper routines. More...

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

Functions

template<typename T >
static wil::com_ptr< T > xrt::auxiliary::d3d::try_create_dxgi_factory ()
 
wil::com_ptr< IDXGIAdapter > xrt::auxiliary::d3d::getAdapterByIndex (uint16_t index, u_logging_level log_level=U_LOGGING_INFO)
 Create a DXGI Adapter, using our priorities. More...
 
wil::com_ptr< IDXGIAdapter > xrt::auxiliary::d3d::getAdapterByLUID (const xrt_luid_t &luid, u_logging_level log_level=U_LOGGING_INFO)
 Create a DXGI Adapter, for the provided LUID. 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

◆ getAdapterByIndex()

wil::com_ptr< IDXGIAdapter > xrt::auxiliary::d3d::getAdapterByIndex ( uint16_t  index,
u_logging_level  log_level = U_LOGGING_INFO 
)

Create a DXGI Adapter, using our priorities.

We try to use IDXGIFactory6::EnumAdapterByGpuPreference preferring HIGH_PERFORMANCE, if it's available

Parameters
indexThe requested adapter index
log_levelThe level to compare against for internal log messages
Exceptions
wil::ResultExceptionin case of error
Returns
wil::com_ptr<IDXGIAdapter>

References xrt::auxiliary::d3d::getAdapterByIndex().

Referenced by xrt::auxiliary::d3d::getAdapterByIndex(), and oxr_d3d_get_requirements().

◆ getAdapterByLUID()

wil::com_ptr< IDXGIAdapter > xrt::auxiliary::d3d::getAdapterByLUID ( const xrt_luid_t luid,
u_logging_level  log_level = U_LOGGING_INFO 
)

Create a DXGI Adapter, for the provided LUID.

Parameters
luidThe requested adapter luid
log_levelThe level to compare against for internal log messages
Exceptions
wil::ResultExceptionin case of error
Returns
wil::com_ptr<IDXGIAdapter>

References xrt::auxiliary::d3d::getAdapterByLUID().

Referenced by xrt::auxiliary::d3d::getAdapterByLUID(), and oxr_d3d_get_requirements().