mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-11 01:48:09 +00:00
[idd] driver: reduce CopyQueue contention
This commit is contained in:
@@ -172,14 +172,15 @@ bool CD3D12Device::HeapTest()
|
||||
|
||||
CD3D12CommandQueue * CD3D12Device::GetCopyQueue()
|
||||
{
|
||||
for(int c = 0; c < 100; ++c)
|
||||
// try for up to a maximum of 100ms to find a free copy queue
|
||||
for (int c = 0; c < 100; ++c)
|
||||
{
|
||||
for (int i = 0; i < ARRAYSIZE(m_copyQueue); ++i)
|
||||
{
|
||||
auto& queue = m_copyQueue[i];
|
||||
if (!queue.IsReady())
|
||||
continue;
|
||||
auto& queue = m_copyQueue[m_copyQueueIndex++];
|
||||
if (m_copyQueueIndex == ARRAYSIZE(m_copyQueue))
|
||||
m_copyQueueIndex = 0;
|
||||
|
||||
if (queue.IsReady())
|
||||
{
|
||||
queue.Reset();
|
||||
return &queue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user