From 04bef3c67aa887cab3bc64b6750cc771f4094e43 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 24 Apr 2019 19:49:03 +0200 Subject: [PATCH] [d3d11] Add stub implementation of D3D11DeviceExt --- src/d3d11/d3d11_device.cpp | 39 ++++++++++++++++++++++++++++++++++++++ src/d3d11/d3d11_device.h | 31 ++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 5c86e5a8..b5270c02 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -1745,6 +1745,39 @@ namespace dxvk { + D3D11DeviceExt::D3D11DeviceExt( + D3D11DXGIDevice* pContainer, + D3D11Device* pDevice) + : m_container(pContainer), m_device(pDevice) { + + } + + + ULONG STDMETHODCALLTYPE D3D11DeviceExt::AddRef() { + return m_container->AddRef(); + } + + + ULONG STDMETHODCALLTYPE D3D11DeviceExt::Release() { + return m_container->Release(); + } + + + HRESULT STDMETHODCALLTYPE D3D11DeviceExt::QueryInterface( + REFIID riid, + void** ppvObject) { + return m_container->QueryInterface(riid, ppvObject); + } + + + BOOL STDMETHODCALLTYPE D3D11DeviceExt::GetExtensionSupport( + D3D11_VK_EXTENSION Extension) { + return FALSE; + } + + + + WineDXGISwapChainFactory::WineDXGISwapChainFactory( D3D11DXGIDevice* pContainer, D3D11Device* pDevice) @@ -1829,6 +1862,7 @@ namespace dxvk { m_dxvkAdapter (pDxvkAdapter), m_dxvkDevice (CreateDevice(FeatureLevel)), m_d3d11Device (this, FeatureLevel, FeatureFlags), + m_d3d11DeviceExt(this, &m_d3d11Device), m_d3d11Interop (this, &m_d3d11Device), m_wineFactory (this, &m_d3d11Device), m_frameLatencyCap(m_d3d11Device.GetOptions()->maxFrameLatency) { @@ -1875,6 +1909,11 @@ namespace dxvk { return S_OK; } + if (riid == __uuidof(ID3D11VkExtDevice)) { + *ppvObject = ref(&m_d3d11DeviceExt); + return S_OK; + } + if (riid == __uuidof(IWineDXGISwapChainFactory)) { *ppvObject = ref(&m_wineFactory); return S_OK; diff --git a/src/d3d11/d3d11_device.h b/src/d3d11/d3d11_device.h index 3017b4ca..aaaade4e 100644 --- a/src/d3d11/d3d11_device.h +++ b/src/d3d11/d3d11_device.h @@ -397,6 +397,36 @@ namespace dxvk { }; + /** + * \brief Extended D3D11 device + */ + class D3D11DeviceExt : public ID3D11VkExtDevice { + + public: + + D3D11DeviceExt( + D3D11DXGIDevice* pContainer, + D3D11Device* pDevice); + + ULONG STDMETHODCALLTYPE AddRef(); + + ULONG STDMETHODCALLTYPE Release(); + + HRESULT STDMETHODCALLTYPE QueryInterface( + REFIID riid, + void** ppvObject); + + BOOL STDMETHODCALLTYPE GetExtensionSupport( + D3D11_VK_EXTENSION Extension); + + private: + + D3D11DXGIDevice* m_container; + D3D11Device* m_device; + + }; + + /** * \brief DXGI swap chain factory */ @@ -513,6 +543,7 @@ namespace dxvk { Rc m_dxvkDevice; D3D11Device m_d3d11Device; + D3D11DeviceExt m_d3d11DeviceExt; D3D11VkInterop m_d3d11Interop; WineDXGISwapChainFactory m_wineFactory;