[d3d11] Use callback fence to signal Flush1 event

This commit is contained in:
Philip Rebohle 2021-08-02 19:10:48 +02:00
parent 893da94fb3
commit 4c222ec557
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 7 additions and 5 deletions

View File

@ -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,

View File

@ -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();