From 56daf44d4cb371fc7ffb2560908de1a9afa6e791 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 16 Sep 2019 16:26:03 +0200 Subject: [PATCH] [d3d11] Implement ID3D11Device4 --- src/d3d11/d3d11_device.cpp | 24 +++++++++++++++++++++++- src/d3d11/d3d11_device.h | 9 ++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 586fff20..029baa05 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -1765,6 +1765,27 @@ namespace dxvk { } + HRESULT STDMETHODCALLTYPE D3D11Device::RegisterDeviceRemovedEvent( + HANDLE hEvent, + DWORD* pdwCookie) { + static bool s_errorShown = false; + + if (!std::exchange(s_errorShown, true)) + Logger::err("D3D11Device::RegisterDeviceRemovedEvent: Not implemented"); + + return E_NOTIMPL; + } + + + void STDMETHODCALLTYPE D3D11Device::UnregisterDeviceRemoved( + DWORD dwCookie) { + static bool s_errorShown = false; + + if (!std::exchange(s_errorShown, true)) + Logger::err("D3D11Device::UnregisterDeviceRemovedEvent: Not implemented"); + } + + DXGI_VK_FORMAT_INFO D3D11Device::LookupFormat( DXGI_FORMAT Format, DXGI_VK_FORMAT_MODE Mode) const { @@ -2356,7 +2377,8 @@ namespace dxvk { if (riid == __uuidof(ID3D11Device) || riid == __uuidof(ID3D11Device1) || riid == __uuidof(ID3D11Device2) - || riid == __uuidof(ID3D11Device3)) { + || riid == __uuidof(ID3D11Device3) + || riid == __uuidof(ID3D11Device4)) { *ppvObject = ref(&m_d3d11Device); return S_OK; } diff --git a/src/d3d11/d3d11_device.h b/src/d3d11/d3d11_device.h index 680d4120..dd31c99f 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 ID3D11Device3 { + class D3D11Device final : public ID3D11Device4 { /// Maximum number of resource init commands per command buffer constexpr static uint64_t InitCommandThreshold = 50; public: @@ -367,6 +367,13 @@ namespace dxvk { UINT FirstSubresourceTilingToGet, D3D11_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips); + HRESULT STDMETHODCALLTYPE RegisterDeviceRemovedEvent( + HANDLE hEvent, + DWORD* pdwCookie); + + void STDMETHODCALLTYPE UnregisterDeviceRemoved( + DWORD dwCookie); + Rc GetDXVKDevice() { return m_dxvkDevice; }