mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[d3d11] Use callback fence to signal Flush1 event
This commit is contained in:
parent
893da94fb3
commit
4c222ec557
@ -596,9 +596,11 @@ namespace dxvk {
|
||||
uint64_t value = ++m_eventCount;
|
||||
|
||||
if (m_eventSignal == nullptr)
|
||||
m_eventSignal = new sync::Win32Fence();
|
||||
m_eventSignal = new sync::CallbackFence();
|
||||
|
||||
m_eventSignal->setEvent(hEvent, value);
|
||||
m_eventSignal->setCallback(value, [hEvent] {
|
||||
SetEvent(hEvent);
|
||||
});
|
||||
|
||||
EmitCs([
|
||||
cSignal = m_eventSignal,
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "../util/util_time.h"
|
||||
|
||||
#include "../util/sync/sync_signal_win32.h"
|
||||
#include "../util/sync/sync_signal.h"
|
||||
|
||||
#include "d3d11_context.h"
|
||||
#include "d3d11_state_object.h"
|
||||
@ -118,8 +118,8 @@ namespace dxvk {
|
||||
DxvkCsThread m_csThread;
|
||||
bool m_csIsBusy = false;
|
||||
|
||||
Rc<sync::Win32Fence> m_eventSignal;
|
||||
uint64_t m_eventCount = 0;
|
||||
Rc<sync::CallbackFence> m_eventSignal;
|
||||
uint64_t m_eventCount = 0;
|
||||
|
||||
dxvk::high_resolution_clock::time_point m_lastFlush
|
||||
= dxvk::high_resolution_clock::now();
|
||||
|
Loading…
x
Reference in New Issue
Block a user