From 0cc841bc76eda21793f2a158b0ededad5a5ae3bf Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 16 Sep 2020 16:11:56 -0700 Subject: Added GPU vendor and memory size detection (API 240071), closed https://github.com/DiligentGraphics/DiligentCore/issues/144. Fixed shader model selection in D3D12 backend --- Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp index 41327332..127abdfc 100644 --- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp @@ -184,17 +184,7 @@ RenderDeviceD3D12Impl::RenderDeviceD3D12Impl(IReferenceCounters* pRefCo if (auto pDXGIAdapter1 = DXGIAdapterFromD3D12Device(pd3d12Device)) { - DXGI_ADAPTER_DESC1 AdapterDesc = {}; - - auto hr = pDXGIAdapter1->GetDesc1(&AdapterDesc); - if (SUCCEEDED(hr)) - { - m_DeviceCaps.AdaterType = (AdapterDesc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) ? ADAPTER_TYPE_SOFTWARE : ADAPTER_TYPE_HARDWARE; - } - else - { - LOG_ERROR_MESSAGE("Failed to get DXGIDevice adapter desc. Adapter type will be unknown."); - } + ReadAdapterInfo(pDXGIAdapter1); } // Direct3D12 supports shader model 5.1 on all feature levels (even on 11.0), -- cgit v1.2.3