MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetVideoAdapter

Function GetVideoAdapter

trinityal/dx12/Tr2VideoAdapterInfoALDx12.cpp:413–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411namespace TrinityALImpl
412{
413ALResult GetVideoAdapter( unsigned adapterIndex, IDXGIAdapter1** adapter, IDXGIOutput** output )
414{
415 if( !s_factory )
416 {
417 CR_RETURN_HR( InitializeDirect3D() );
418 }
419 if( adapterIndex >= s_adapters.size() )
420 {
421 return E_INVALIDARG;
422 }
423 *adapter = s_adapters[adapterIndex].m_adapter;
424 ( *adapter )->AddRef();
425 *output = s_adapters[adapterIndex].m_output;
426 ( *output )->AddRef();
427 return S_OK;
428}
429
430ALResult Destroy()
431{

Callers 4

GetVideoMemoryInfoFunction · 0.85
CreateDeviceMethod · 0.85
SetPresentParametersMethod · 0.85

Calls 3

sizeMethod · 0.80
AddRefMethod · 0.80
InitializeDirect3DFunction · 0.70

Tested by

no test coverage detected