diff --git a/src/d3d10/d3d10_device.cpp b/src/d3d10/d3d10_device.cpp index e35e131a8..dfd0bdd08 100644 --- a/src/d3d10/d3d10_device.cpp +++ b/src/d3d10/d3d10_device.cpp @@ -8,7 +8,7 @@ namespace dxvk { D3D10Device::D3D10Device( D3D11Device* pDevice, D3D11ImmediateContext* pContext) - : m_device(pDevice), m_context(pContext), m_multithread(this) { + : m_device(pDevice), m_context(pContext) { // Respecting the single-threaded flag may improve performance UINT flags = pDevice->GetCreationFlags(); m_threadSafe = !(flags & D3D10_CREATE_DEVICE_SINGLETHREADED); diff --git a/src/d3d10/d3d10_device.h b/src/d3d10/d3d10_device.h index bdc8e7fab..df9d50fd7 100644 --- a/src/d3d10/d3d10_device.h +++ b/src/d3d10/d3d10_device.h @@ -1,9 +1,12 @@ #pragma once -#include "d3d10_multithread.h" +#include "d3d10_include.h" namespace dxvk { + using D3D10DeviceMutex = sync::Spinlock; + using D3D10DeviceLock = std::unique_lock; + class D3D11Device; class D3D11ImmediateContext; @@ -470,10 +473,6 @@ namespace dxvk { UINT* pWidth, UINT* pHeight); - D3D10Multithread* GetMultithreadIface() { - return &m_multithread; - } - D3D10DeviceLock LockDevice() { return m_threadSafe ? D3D10DeviceLock(m_mutex) @@ -485,7 +484,6 @@ namespace dxvk { D3D10DeviceMutex m_mutex; D3D11Device* m_device; D3D11ImmediateContext* m_context; - D3D10Multithread m_multithread; bool m_threadSafe = true; diff --git a/src/d3d10/d3d10_multithread.cpp b/src/d3d10/d3d10_multithread.cpp deleted file mode 100644 index 9f3949fdc..000000000 --- a/src/d3d10/d3d10_multithread.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "d3d10_multithread.h" -#include "d3d10_device.h" - -namespace dxvk { - - HRESULT STDMETHODCALLTYPE D3D10Multithread::QueryInterface( - REFIID riid, - void** ppvObject) { - return m_device->QueryInterface(riid, ppvObject); - } - - - ULONG STDMETHODCALLTYPE D3D10Multithread::AddRef() { - return m_device->AddRef(); - } - - - ULONG STDMETHODCALLTYPE D3D10Multithread::Release() { - return m_device->Release(); - } - - - void STDMETHODCALLTYPE D3D10Multithread::Enter() { - m_lock = m_device->LockDevice(); - } - - - void STDMETHODCALLTYPE D3D10Multithread::Leave() { - m_lock.unlock(); - } - - - BOOL STDMETHODCALLTYPE D3D10Multithread::GetMultithreadProtected() { - return m_enabled; - } - - - BOOL STDMETHODCALLTYPE D3D10Multithread::SetMultithreadProtected(BOOL Enable) { - return std::exchange(m_enabled, Enable); - } - -} \ No newline at end of file diff --git a/src/d3d10/d3d10_multithread.h b/src/d3d10/d3d10_multithread.h deleted file mode 100644 index 81d5dbcec..000000000 --- a/src/d3d10/d3d10_multithread.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include "d3d10_include.h" - -namespace dxvk { - - using D3D10DeviceMutex = sync::Spinlock; - using D3D10DeviceLock = std::unique_lock; - - class D3D10Device; - - class D3D10Multithread : public ID3D10Multithread { - - public: - - D3D10Multithread(D3D10Device* pDevice) - : m_device(pDevice) { } - - HRESULT STDMETHODCALLTYPE QueryInterface( - REFIID riid, - void** ppvObject); - - ULONG STDMETHODCALLTYPE AddRef(); - - ULONG STDMETHODCALLTYPE Release(); - - void STDMETHODCALLTYPE Enter(); - - void STDMETHODCALLTYPE Leave(); - - BOOL STDMETHODCALLTYPE GetMultithreadProtected(); - - BOOL STDMETHODCALLTYPE SetMultithreadProtected(BOOL Enable); - - private: - - D3D10Device* m_device; - D3D10DeviceLock m_lock; - bool m_enabled = true; - - }; - -} \ No newline at end of file diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 175b4de82..b5e13a5d5 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -61,11 +61,6 @@ namespace dxvk { return S_OK; } - if (riid == __uuidof(ID3D10Multithread)) { - *ppvObject = ref(m_d3d11Device->GetD3D10Interface()->GetMultithreadIface()); - return S_OK; - } - if (riid == __uuidof(ID3D11Device) || riid == __uuidof(ID3D11Device1)) { *ppvObject = ref(m_d3d11Device); diff --git a/src/d3d11/meson.build b/src/d3d11/meson.build index c0889b203..a8596b765 100644 --- a/src/d3d11/meson.build +++ b/src/d3d11/meson.build @@ -4,7 +4,6 @@ d3d10_src = [ '../d3d10/d3d10_depth_stencil.cpp', '../d3d10/d3d10_device.cpp', '../d3d10/d3d10_input_layout.cpp', - '../d3d10/d3d10_multithread.cpp', '../d3d10/d3d10_query.cpp', '../d3d10/d3d10_rasterizer.cpp', '../d3d10/d3d10_sampler.cpp',