mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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;
|
uint64_t value = ++m_eventCount;
|
||||||
|
|
||||||
if (m_eventSignal == nullptr)
|
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([
|
EmitCs([
|
||||||
cSignal = m_eventSignal,
|
cSignal = m_eventSignal,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "../util/util_time.h"
|
#include "../util/util_time.h"
|
||||||
|
|
||||||
#include "../util/sync/sync_signal_win32.h"
|
#include "../util/sync/sync_signal.h"
|
||||||
|
|
||||||
#include "d3d11_context.h"
|
#include "d3d11_context.h"
|
||||||
#include "d3d11_state_object.h"
|
#include "d3d11_state_object.h"
|
||||||
@ -118,8 +118,8 @@ namespace dxvk {
|
|||||||
DxvkCsThread m_csThread;
|
DxvkCsThread m_csThread;
|
||||||
bool m_csIsBusy = false;
|
bool m_csIsBusy = false;
|
||||||
|
|
||||||
Rc<sync::Win32Fence> m_eventSignal;
|
Rc<sync::CallbackFence> m_eventSignal;
|
||||||
uint64_t m_eventCount = 0;
|
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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user