mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Add DxvkEvent::wait method
This commit is contained in:
parent
336b3858c9
commit
0fd8019a70
@ -26,5 +26,11 @@ namespace dxvk {
|
|||||||
std::unique_lock<std::mutex> lock(m_mutex);
|
std::unique_lock<std::mutex> lock(m_mutex);
|
||||||
return m_status;
|
return m_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DxvkEvent::wait() {
|
||||||
|
while (this->getStatus() != DxvkEventStatus::Signaled)
|
||||||
|
dxvk::this_thread::yield();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -46,6 +46,15 @@ namespace dxvk {
|
|||||||
*/
|
*/
|
||||||
DxvkEventStatus getStatus();
|
DxvkEventStatus getStatus();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Waits for event to get signaled
|
||||||
|
*
|
||||||
|
* Blocks the calling thread until another
|
||||||
|
* thread calls \ref signal for the current
|
||||||
|
* revision of the event.
|
||||||
|
*/
|
||||||
|
void wait();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::mutex m_mutex;
|
std::mutex m_mutex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user