Monado OpenXR Runtime
d3d_dxgi_helpers.hpp File Reference

Misc D3D11/12 helper routines. More...

#include "xrt/xrt_defines.h"
#include "util/u_logging.h"
#include <dxgi.h>
#include <wil/com.h>
#include <utility>
Include dependency graph for d3d_dxgi_helpers.hpp:

Go to the source code of this file.

Functions

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/12 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().