mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 04:29:15 +01:00
[d3d11] Move D3D10Multithread instance to immediate context
Deferred contexts do not support this.
This commit is contained in:
parent
87b1f9fa2d
commit
86bdda70b4
@ -15,7 +15,6 @@ namespace dxvk {
|
||||
: D3D11DeviceChild<ID3D11DeviceContext4>(pParent),
|
||||
m_contextExt(GetTypedContext()),
|
||||
m_annotation(GetTypedContext(), Device),
|
||||
m_multithread(this, false),
|
||||
m_device (Device),
|
||||
m_flags (ContextFlags),
|
||||
m_staging (Device, StagingBufferSize),
|
||||
@ -62,11 +61,6 @@ namespace dxvk {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (riid == __uuidof(ID3D10Multithread)) {
|
||||
*ppvObject = ref(&m_multithread);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
Logger::warn("D3D11DeviceContext::QueryInterface: Unknown interface query");
|
||||
Logger::warn(str::format(riid));
|
||||
return E_NOINTERFACE;
|
||||
|
@ -756,15 +756,10 @@ namespace dxvk {
|
||||
VkImageLayout OldLayout,
|
||||
VkImageLayout NewLayout);
|
||||
|
||||
D3D10DeviceLock LockContext() {
|
||||
return m_multithread.AcquireLock();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
D3D11DeviceContextExt<ContextType> m_contextExt;
|
||||
D3D11UserDefinedAnnotation<ContextType> m_annotation;
|
||||
D3D10Multithread m_multithread;
|
||||
|
||||
Rc<DxvkDevice> m_device;
|
||||
|
||||
@ -1124,6 +1119,10 @@ namespace dxvk {
|
||||
return static_cast<ContextType*>(this);
|
||||
}
|
||||
|
||||
D3D10DeviceLock LockContext() {
|
||||
return GetTypedContext()->LockContext();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -79,6 +79,10 @@ namespace dxvk {
|
||||
ID3DDeviceContextState* pState,
|
||||
ID3DDeviceContextState** ppPreviousState);
|
||||
|
||||
D3D10DeviceLock LockContext() {
|
||||
return D3D10DeviceLock();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// Command list that we're recording
|
||||
|
@ -18,6 +18,7 @@ namespace dxvk {
|
||||
: D3D11CommonContext<D3D11ImmediateContext>(pParent, Device, 0, DxvkCsChunkFlag::SingleUse),
|
||||
m_csThread(Device, Device->createContext(DxvkContextType::Primary)),
|
||||
m_maxImplicitDiscardSize(pParent->GetOptions()->maxImplicitDiscardSize),
|
||||
m_multithread(this, false),
|
||||
m_videoContext(this, Device) {
|
||||
EmitCs([
|
||||
cDevice = m_device,
|
||||
@ -54,6 +55,11 @@ namespace dxvk {
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11ImmediateContext::QueryInterface(REFIID riid, void** ppvObject) {
|
||||
if (riid == __uuidof(ID3D10Multithread)) {
|
||||
*ppvObject = ref(&m_multithread);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (riid == __uuidof(ID3D11VideoContext)) {
|
||||
*ppvObject = ref(&m_videoContext);
|
||||
return S_OK;
|
||||
|
@ -79,7 +79,11 @@ namespace dxvk {
|
||||
|
||||
void SynchronizeCsThread(
|
||||
uint64_t SequenceNumber);
|
||||
|
||||
|
||||
D3D10DeviceLock LockContext() {
|
||||
return m_multithread.AcquireLock();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
DxvkCsThread m_csThread;
|
||||
@ -95,6 +99,7 @@ namespace dxvk {
|
||||
dxvk::high_resolution_clock::time_point m_lastFlush
|
||||
= dxvk::high_resolution_clock::now();
|
||||
|
||||
D3D10Multithread m_multithread;
|
||||
D3D11VideoContext m_videoContext;
|
||||
Com<D3D11DeviceContextState> m_stateObject;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user