mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d11] Support signaling event in Flush1
This commit is contained in:
parent
76fd9013d4
commit
a9b6421f60
@ -156,7 +156,7 @@ namespace dxvk {
|
|||||||
m_parent->FlushInitContext();
|
m_parent->FlushInitContext();
|
||||||
|
|
||||||
if (hEvent)
|
if (hEvent)
|
||||||
Logger::warn("D3D11: Flush1: Ignoring event");
|
SignalEvent(hEvent);
|
||||||
|
|
||||||
D3D10DeviceLock lock = LockContext();
|
D3D10DeviceLock lock = LockContext();
|
||||||
|
|
||||||
@ -646,5 +646,22 @@ namespace dxvk {
|
|||||||
Flush();
|
Flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void D3D11ImmediateContext::SignalEvent(HANDLE hEvent) {
|
||||||
|
uint64_t value = ++m_eventCount;
|
||||||
|
|
||||||
|
if (m_eventSignal == nullptr)
|
||||||
|
m_eventSignal = new sync::Win32Fence();
|
||||||
|
|
||||||
|
m_eventSignal->setEvent(hEvent, value);
|
||||||
|
|
||||||
|
EmitCs([
|
||||||
|
cSignal = m_eventSignal,
|
||||||
|
cValue = value
|
||||||
|
] (DxvkContext* ctx) {
|
||||||
|
ctx->signal(cSignal, cValue);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "../util/util_time.h"
|
#include "../util/util_time.h"
|
||||||
|
|
||||||
|
#include "../util/sync/sync_signal_win32.h"
|
||||||
|
|
||||||
#include "d3d11_context.h"
|
#include "d3d11_context.h"
|
||||||
#include "d3d11_state_object.h"
|
#include "d3d11_state_object.h"
|
||||||
|
|
||||||
@ -116,6 +118,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
std::atomic<uint32_t> m_refCount = { 0 };
|
std::atomic<uint32_t> m_refCount = { 0 };
|
||||||
|
|
||||||
|
Rc<sync::Win32Fence> m_eventSignal;
|
||||||
|
uint64_t m_eventCount = 0;
|
||||||
|
|
||||||
dxvk::high_resolution_clock::time_point m_lastFlush
|
dxvk::high_resolution_clock::time_point m_lastFlush
|
||||||
= dxvk::high_resolution_clock::now();
|
= dxvk::high_resolution_clock::now();
|
||||||
|
|
||||||
@ -148,6 +153,8 @@ namespace dxvk {
|
|||||||
void EmitCsChunk(DxvkCsChunkRef&& chunk);
|
void EmitCsChunk(DxvkCsChunkRef&& chunk);
|
||||||
|
|
||||||
void FlushImplicit(BOOL StrongHint);
|
void FlushImplicit(BOOL StrongHint);
|
||||||
|
|
||||||
|
void SignalEvent(HANDLE hEvent);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user