diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-03-19 08:26:21 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-03-19 08:26:21 +0000 |
| commit | 4db9d8adf1f6508d5372d51263e1076c95f45efb (patch) | |
| tree | f22e9a91ed20d82b6d99546e22f3e2453f434058 /Graphics/GraphicsEngineD3D12 | |
| parent | Renamed USAGE_CPU_ACCESSIBLE to USAGE_STAGING (diff) | |
| download | DiligentCore-4db9d8adf1f6508d5372d51263e1076c95f45efb.tar.gz DiligentCore-4db9d8adf1f6508d5372d51263e1076c95f45efb.zip | |
Fixed issue in hardware adapter enumeration in D3D12 backend
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp index cb1fa5ff..6806fafc 100644 --- a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp +++ b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp @@ -76,12 +76,12 @@ public: ISwapChain** ppSwapChain )override final; }; -void GetHardwareAdapter(IDXGIFactory2* pFactory, IDXGIAdapter1** ppAdapter) +static void GetHardwareAdapter(IDXGIFactory2* pFactory, IDXGIAdapter1** ppAdapter) { CComPtr<IDXGIAdapter1> adapter; *ppAdapter = nullptr; - for (UINT adapterIndex = 0; DXGI_ERROR_NOT_FOUND != pFactory->EnumAdapters1(adapterIndex, &adapter); ++adapterIndex) + for (UINT adapterIndex = 0; DXGI_ERROR_NOT_FOUND != pFactory->EnumAdapters1(adapterIndex, &adapter); ++adapterIndex, adapter.Release()) { DXGI_ADAPTER_DESC1 desc; adapter->GetDesc1(&desc); |
