mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-24 23:56:26 +00:00
[idd] driver: reduce CopyQueue contention
This commit is contained in:
parent
f4df3f0ec7
commit
57a2f68931
@ -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;
|
||||
}
|
||||
|
@ -29,7 +29,8 @@ struct CD3D12Device
|
||||
ComPtr<ID3D12Device3> m_device;
|
||||
ComPtr<ID3D12Heap > m_ivshmemHeap;
|
||||
|
||||
CD3D12CommandQueue m_copyQueue[2];
|
||||
CD3D12CommandQueue m_copyQueue[4];
|
||||
unsigned m_copyQueueIndex = 0;
|
||||
CD3D12CommandQueue m_computeQueue;
|
||||
|
||||
bool HeapTest();
|
||||
|
Loading…
x
Reference in New Issue
Block a user