diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 029baa053..1f75050d7 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -1305,6 +1305,22 @@ namespace dxvk { } + HRESULT STDMETHODCALLTYPE D3D11Device::CreateFence( + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + REFIID ReturnedInterface, + void** ppFence) { + InitReturnPtr(ppFence); + + static bool s_errorShown = false; + + if (!std::exchange(s_errorShown, true)) + Logger::err("D3D11Device::CreateFence: Not implemented"); + + return E_NOTIMPL; + } + + void STDMETHODCALLTYPE D3D11Device::ReadFromSubresource( void* pDstData, UINT DstRowPitch, @@ -1365,7 +1381,19 @@ namespace dxvk { Logger::err("D3D11Device::OpenSharedResourceByName: Not implemented"); return E_NOTIMPL; } - + + + HRESULT STDMETHODCALLTYPE D3D11Device::OpenSharedFence( + HANDLE hFence, + REFIID ReturnedInterface, + void** ppFence) { + InitReturnPtr(ppFence); + + Logger::err("D3D11Device::OpenSharedFence: Not implemented"); + return E_NOTIMPL; + } + + HRESULT STDMETHODCALLTYPE D3D11Device::CheckFormatSupport( DXGI_FORMAT Format, UINT* pFormatSupport) { @@ -2378,7 +2406,8 @@ namespace dxvk { || riid == __uuidof(ID3D11Device1) || riid == __uuidof(ID3D11Device2) || riid == __uuidof(ID3D11Device3) - || riid == __uuidof(ID3D11Device4)) { + || riid == __uuidof(ID3D11Device4) + || riid == __uuidof(ID3D11Device5)) { *ppvObject = ref(&m_d3d11Device); return S_OK; } diff --git a/src/d3d11/d3d11_device.h b/src/d3d11/d3d11_device.h index dd31c99f5..3761db599 100644 --- a/src/d3d11/d3d11_device.h +++ b/src/d3d11/d3d11_device.h @@ -45,7 +45,7 @@ namespace dxvk { * Implements the ID3D11Device interfaces * as part of a \ref D3D11DeviceContainer. */ - class D3D11Device final : public ID3D11Device4 { + class D3D11Device final : public ID3D11Device5 { /// Maximum number of resource init commands per command buffer constexpr static uint64_t InitCommandThreshold = 50; public: @@ -256,6 +256,12 @@ namespace dxvk { D3D_FEATURE_LEVEL* pChosenFeatureLevel, ID3DDeviceContextState** ppContextState); + HRESULT STDMETHODCALLTYPE CreateFence( + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + REFIID ReturnedInterface, + void** ppFence); + void STDMETHODCALLTYPE ReadFromSubresource( void* pDstData, UINT DstRowPitch, @@ -288,6 +294,11 @@ namespace dxvk { REFIID returnedInterface, void** ppResource); + HRESULT STDMETHODCALLTYPE OpenSharedFence( + HANDLE hFence, + REFIID ReturnedInterface, + void** ppFence); + HRESULT STDMETHODCALLTYPE CheckFormatSupport( DXGI_FORMAT Format, UINT* pFormatSupport);