[d3d11] Implement ID3D11DeviceContext3

This commit is contained in:
Philip Rebohle 2019-09-16 13:12:13 +02:00
parent 17a6c4168e
commit 0599a82dee
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
6 changed files with 60 additions and 7 deletions

View File

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

View File

@ -17,7 +17,7 @@ namespace dxvk {
class D3D11Device;
class D3D11DeviceContext : public D3D11DeviceChild<ID3D11DeviceContext2> {
class D3D11DeviceContext : public D3D11DeviceChild<ID3D11DeviceContext3> {
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,

View File

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

View File

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

View File

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

View File

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