mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-24 23:56:26 +00:00
[idd] driver: use a timeout instead of an event wait.
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Waiting on the events is dangerous as there is a race here where we may end up stuck as the events need to be auto-reset
This commit is contained in:
parent
b58171c3e1
commit
3b883bf9fe
@ -171,21 +171,17 @@ bool CD3D12Device::HeapTest()
|
||||
|
||||
CD3D12CommandQueue * CD3D12Device::GetCopyQueue()
|
||||
{
|
||||
HANDLE waitOn[ARRAYSIZE(m_copyQueue)];
|
||||
|
||||
for (int i = 0; i < ARRAYSIZE(m_copyQueue); ++i)
|
||||
for(int c = 0; c < 100; ++c)
|
||||
{
|
||||
auto& queue = m_copyQueue[i];
|
||||
if (queue.IsReady())
|
||||
return &queue;
|
||||
|
||||
waitOn[i] = queue.GetEvent();
|
||||
for (int i = 0; i < ARRAYSIZE(m_copyQueue); ++i)
|
||||
{
|
||||
auto& queue = m_copyQueue[i];
|
||||
if (queue.IsReady())
|
||||
return &queue;
|
||||
}
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
DEBUG_TRACE("Wait");
|
||||
DWORD ready = WaitForMultipleObjects(ARRAYSIZE(waitOn), waitOn, FALSE, INFINITE);
|
||||
if (ready < ARRAYSIZE(waitOn))
|
||||
return &m_copyQueue[ready];
|
||||
|
||||
DEBUG_ERROR("Failed to get a copy queue");
|
||||
return nullptr;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user