summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/interface/RenderDeviceFactoryD3D12.h9
-rw-r--r--Graphics/GraphicsEngineD3D12/src/RenderDeviceFactoryD3D12.cpp15
2 files changed, 16 insertions, 8 deletions
diff --git a/Graphics/GraphicsEngineD3D12/interface/RenderDeviceFactoryD3D12.h b/Graphics/GraphicsEngineD3D12/interface/RenderDeviceFactoryD3D12.h
index bdc3d8a0..6a8c7e6e 100644
--- a/Graphics/GraphicsEngineD3D12/interface/RenderDeviceFactoryD3D12.h
+++ b/Graphics/GraphicsEngineD3D12/interface/RenderDeviceFactoryD3D12.h
@@ -60,6 +60,15 @@ public:
void* pNativeWndHandle,
ISwapChain **ppSwapChain ) = 0;
+ virtual void EnumerateHardwareAdapters(Uint32 &NumAdapters,
+ HardwareAdapterAttribs *Adapters) = 0;
+
+ virtual void EnumerateDisplayModes(Uint32 AdapterId,
+ Uint32 OutputId,
+ TEXTURE_FORMAT Format,
+ Uint32 &NumDisplayModes,
+ DisplayModeAttribs *DisplayModes) = 0;
+
};
diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceFactoryD3D12.cpp
index 8c62382b..8e41f986 100644
--- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceFactoryD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceFactoryD3D12.cpp
@@ -30,6 +30,7 @@
#include "DeviceContextD3D12Impl.h"
#include "SwapChainD3D12Impl.h"
#include "D3D12TypeConversions.h"
+#include "EngineFactoryD3DBase.h"
#include "StringTools.h"
#include "EngineMemory.h"
#include "CommandQueueD3D12Impl.h"
@@ -40,7 +41,7 @@ namespace Diligent
{
/// Engine factory for D3D12 implementation
-class EngineFactoryD3D12Impl : public IEngineFactoryD3D12
+class EngineFactoryD3D12Impl : public EngineFactoryD3DBase<IEngineFactoryD3D12, DeviceType::D3D12>
{
public:
static EngineFactoryD3D12Impl* GetInstance()
@@ -62,11 +63,10 @@ public:
Uint32 NumDeferredContexts)override final;
void CreateSwapChainD3D12( IRenderDevice *pDevice,
- IDeviceContext *pImmediateContext,
- const SwapChainDesc& SwapChainDesc,
- void* pNativeWndHandle,
- ISwapChain **ppSwapChain )override final;
-
+ IDeviceContext *pImmediateContext,
+ const SwapChainDesc& SwapChainDesc,
+ void* pNativeWndHandle,
+ ISwapChain **ppSwapChain )override final;
};
void GetHardwareAdapter(IDXGIFactory2* pFactory, IDXGIAdapter1** ppAdapter)
@@ -81,8 +81,7 @@ void GetHardwareAdapter(IDXGIFactory2* pFactory, IDXGIAdapter1** ppAdapter)
if (desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE)
{
- // Don't select the Basic Render Driver adapter.
- // If you want a software adapter, pass in "/warp" on the command line.
+ // Skip software devices
continue;
}