diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 294b98e9..885a02de 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -55,7 +55,8 @@ namespace dxvk { || riid == __uuidof(ID3D11DeviceChild) || riid == __uuidof(ID3D11DeviceContext) || riid == __uuidof(ID3D11DeviceContext1) - || riid == __uuidof(ID3D11DeviceContext2)) { + || riid == __uuidof(ID3D11DeviceContext2) + || riid == __uuidof(ID3D11DeviceContext3)) { *ppvObject = ref(this); return S_OK; } @@ -3124,6 +3125,27 @@ namespace dxvk { } + void STDMETHODCALLTYPE D3D11DeviceContext::GetHardwareProtectionState( + BOOL* pHwProtectionEnable) { + static bool s_errorShown = false; + + if (!std::exchange(s_errorShown, true)) + Logger::err("D3D11DeviceContext::GetHardwareProtectionState: Not implemented"); + + if (pHwProtectionEnable) + *pHwProtectionEnable = FALSE; + } + + + void STDMETHODCALLTYPE D3D11DeviceContext::SetHardwareProtectionState( + BOOL HwProtectionEnable) { + static bool s_errorShown = false; + + if (!std::exchange(s_errorShown, true)) + Logger::err("D3D11DeviceContext::SetHardwareProtectionState: Not implemented"); + } + + void STDMETHODCALLTYPE D3D11DeviceContext::TransitionSurfaceLayout( IDXGIVkInteropSurface* pSurface, const VkImageSubresourceRange* pSubresources, diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h index a438c9e8..6c01c57f 100644 --- a/src/d3d11/d3d11_context.h +++ b/src/d3d11/d3d11_context.h @@ -17,7 +17,7 @@ namespace dxvk { class D3D11Device; - class D3D11DeviceContext : public D3D11DeviceChild { + class D3D11DeviceContext : public D3D11DeviceChild { friend class D3D11DeviceContextExt; public: @@ -692,6 +692,12 @@ namespace dxvk { void STDMETHODCALLTYPE EndEvent(); + void STDMETHODCALLTYPE GetHardwareProtectionState( + BOOL* pHwProtectionEnable); + + void STDMETHODCALLTYPE SetHardwareProtectionState( + BOOL HwProtectionEnable); + void STDMETHODCALLTYPE TransitionSurfaceLayout( IDXGIVkInteropSurface* pSurface, const VkImageSubresourceRange* pSubresources, diff --git a/src/d3d11/d3d11_context_def.cpp b/src/d3d11/d3d11_context_def.cpp index 274b901f..ba99f4bb 100644 --- a/src/d3d11/d3d11_context_def.cpp +++ b/src/d3d11/d3d11_context_def.cpp @@ -37,6 +37,13 @@ namespace dxvk { void STDMETHODCALLTYPE D3D11DeferredContext::Flush() { Logger::err("D3D11: Flush called on a deferred context"); } + + + void STDMETHODCALLTYPE D3D11DeferredContext::Flush1( + D3D11_CONTEXT_TYPE ContextType, + HANDLE hEvent) { + Logger::err("D3D11: Flush1 called on a deferred context"); + } void STDMETHODCALLTYPE D3D11DeferredContext::ExecuteCommandList( diff --git a/src/d3d11/d3d11_context_def.h b/src/d3d11/d3d11_context_def.h index 788510da..fe9354d0 100644 --- a/src/d3d11/d3d11_context_def.h +++ b/src/d3d11/d3d11_context_def.h @@ -41,14 +41,18 @@ namespace dxvk { UINT GetDataFlags); void STDMETHODCALLTYPE Flush(); - + + void STDMETHODCALLTYPE Flush1( + D3D11_CONTEXT_TYPE ContextType, + HANDLE hEvent); + void STDMETHODCALLTYPE ExecuteCommandList( - ID3D11CommandList* pCommandList, - BOOL RestoreContextState); + ID3D11CommandList* pCommandList, + BOOL RestoreContextState); HRESULT STDMETHODCALLTYPE FinishCommandList( - BOOL RestoreDeferredContextState, - ID3D11CommandList **ppCommandList); + BOOL RestoreDeferredContextState, + ID3D11CommandList** ppCommandList); HRESULT STDMETHODCALLTYPE Map( ID3D11Resource* pResource, diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index 118da122..3570b233 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -110,7 +110,17 @@ namespace dxvk { void STDMETHODCALLTYPE D3D11ImmediateContext::Flush() { + Flush1(D3D11_CONTEXT_TYPE_ALL, nullptr); + } + + + void STDMETHODCALLTYPE D3D11ImmediateContext::Flush1( + D3D11_CONTEXT_TYPE ContextType, + HANDLE hEvent) { m_parent->FlushInitContext(); + + if (hEvent) + Logger::warn("D3D11: Flush1: Ignoring event"); D3D10DeviceLock lock = LockContext(); diff --git a/src/d3d11/d3d11_context_imm.h b/src/d3d11/d3d11_context_imm.h index d1de71a3..10ae16e6 100644 --- a/src/d3d11/d3d11_context_imm.h +++ b/src/d3d11/d3d11_context_imm.h @@ -36,6 +36,10 @@ namespace dxvk { void STDMETHODCALLTYPE Flush(); + void STDMETHODCALLTYPE Flush1( + D3D11_CONTEXT_TYPE ContextType, + HANDLE hEvent); + void STDMETHODCALLTYPE ExecuteCommandList( ID3D11CommandList* pCommandList, BOOL RestoreContextState);