From c92d68417e5f41ff968e4c7f282e6389aba87aca Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 9 Dec 2017 14:45:52 +0100 Subject: [PATCH] [dxgi] Bumped DxgiDevice to IDXGIDevice1 --- src/dxgi/dxgi_device.cpp | 16 ++++++++++++++++ src/dxgi/dxgi_device.h | 6 ++++++ src/dxgi/dxgi_interfaces.h | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/dxgi/dxgi_device.cpp b/src/dxgi/dxgi_device.cpp index de4a387a..77a1680e 100644 --- a/src/dxgi/dxgi_device.cpp +++ b/src/dxgi/dxgi_device.cpp @@ -20,6 +20,7 @@ namespace dxvk { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, IDXGIObject); COM_QUERY_IFACE(riid, ppvObject, IDXGIDevice); + COM_QUERY_IFACE(riid, ppvObject, IDXGIDevice1); COM_QUERY_IFACE(riid, ppvObject, IDXGIDevicePrivate); if (m_layer != nullptr) @@ -79,6 +80,21 @@ namespace dxvk { } + HRESULT DxgiDevice::GetMaximumFrameLatency( + UINT* pMaxLatency) { + Logger::warn("DxgiDevice::GetMaximumFrameLatency: Stub"); + *pMaxLatency = 1; + return S_OK; + } + + + HRESULT DxgiDevice::SetMaximumFrameLatency( + UINT MaxLatency) { + Logger::warn("DxgiDevice::SetMaximumFrameLatency: Stub"); + return S_OK; + } + + void DxgiDevice::SetDeviceLayer(IUnknown* layer) { m_layer = layer; } diff --git a/src/dxgi/dxgi_device.h b/src/dxgi/dxgi_device.h index 6911a34e..be8e798e 100644 --- a/src/dxgi/dxgi_device.h +++ b/src/dxgi/dxgi_device.h @@ -47,6 +47,12 @@ namespace dxvk { HRESULT SetGPUThreadPriority( INT Priority) final; + HRESULT GetMaximumFrameLatency( + UINT* pMaxLatency) final; + + HRESULT SetMaximumFrameLatency( + UINT MaxLatency) final; + void SetDeviceLayer( IUnknown* layer) final; diff --git a/src/dxgi/dxgi_interfaces.h b/src/dxgi/dxgi_interfaces.h index b8efece1..c527aa22 100644 --- a/src/dxgi/dxgi_interfaces.h +++ b/src/dxgi/dxgi_interfaces.h @@ -52,7 +52,7 @@ IDXGIAdapterPrivate : public IDXGIAdapter1 { * this interface. */ MIDL_INTERFACE("7a622cf6-627a-46b2-b52f-360ef3da831c") -IDXGIDevicePrivate : public IDXGIDevice { +IDXGIDevicePrivate : public IDXGIDevice1 { static const GUID guid; virtual void SetDeviceLayer(