1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d11] Add stub implementation of D3D11DeviceExt

This commit is contained in:
Philip Rebohle 2019-04-24 19:49:03 +02:00
parent 1cd8749234
commit 04bef3c67a
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 70 additions and 0 deletions

View File

@ -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;

View File

@ -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<DxvkDevice> m_dxvkDevice;
D3D11Device m_d3d11Device;
D3D11DeviceExt m_d3d11DeviceExt;
D3D11VkInterop m_d3d11Interop;
WineDXGISwapChainFactory m_wineFactory;