From 0b7e114cb0488645e5ac0e9311b76f8d0ee59cdc Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 11 Oct 2018 10:43:31 +0200 Subject: [PATCH] [dxgi] Implement IDXGIDevice3 --- src/d3d11/d3d11_device.cpp | 1 + src/dxgi/dxgi_device.cpp | 8 ++++++++ src/dxgi/dxgi_device.h | 2 ++ src/dxgi/dxgi_interfaces.h | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 6c7ba806..a73bd490 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -45,6 +45,7 @@ namespace dxvk { if (riid == __uuidof(IDXGIDevice) || riid == __uuidof(IDXGIDevice1) || riid == __uuidof(IDXGIDevice2) + || riid == __uuidof(IDXGIDevice3) || riid == __uuidof(IDXGIVkDevice)) { *ppvObject = ref(m_dxgiDevice); return S_OK; diff --git a/src/dxgi/dxgi_device.cpp b/src/dxgi/dxgi_device.cpp index 65ef0ec2..0d74e324 100644 --- a/src/dxgi/dxgi_device.cpp +++ b/src/dxgi/dxgi_device.cpp @@ -165,6 +165,14 @@ namespace dxvk { Logger::err("DxgiDevice::EnqueueSetEvent: Not implemented"); return DXGI_ERROR_UNSUPPORTED; } + + + void STDMETHODCALLTYPE DxgiDevice::Trim() { + static bool s_errorShown = false; + + if (!std::exchange(s_errorShown, true)) + Logger::warn("DxgiDevice::Trim: Stub"); + } Rc STDMETHODCALLTYPE DxgiDevice::GetDXVKDevice() { diff --git a/src/dxgi/dxgi_device.h b/src/dxgi/dxgi_device.h index 0fbd54cc..e5a675b4 100644 --- a/src/dxgi/dxgi_device.h +++ b/src/dxgi/dxgi_device.h @@ -87,6 +87,8 @@ namespace dxvk { HRESULT STDMETHODCALLTYPE EnqueueSetEvent( HANDLE hEvent) final; + void STDMETHODCALLTYPE Trim() final; + Rc STDMETHODCALLTYPE GetDXVKDevice() final; Rc STDMETHODCALLTYPE GetFrameSyncEvent() final; diff --git a/src/dxgi/dxgi_interfaces.h b/src/dxgi/dxgi_interfaces.h index 63bf7c7d..4405949b 100644 --- a/src/dxgi/dxgi_interfaces.h +++ b/src/dxgi/dxgi_interfaces.h @@ -70,7 +70,7 @@ IDXGIVkSwapChain : public IUnknown { * this interface. */ MIDL_INTERFACE("7a622cf6-627a-46b2-b52f-360ef3da831c") -IDXGIVkDevice : public IDXGIDevice2 { +IDXGIVkDevice : public IDXGIDevice3 { static const GUID guid; virtual ~IDXGIVkDevice() { }