mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-05-02 20:51:10 +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()
|
CD3D12CommandQueue * CD3D12Device::GetCopyQueue()
|
||||||
{
|
{
|
||||||
|
// try for up to a maximum of 100ms to find a free copy queue
|
||||||
for (int c = 0; c < 100; ++c)
|
for (int c = 0; c < 100; ++c)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ARRAYSIZE(m_copyQueue); ++i)
|
auto& queue = m_copyQueue[m_copyQueueIndex++];
|
||||||
{
|
if (m_copyQueueIndex == ARRAYSIZE(m_copyQueue))
|
||||||
auto& queue = m_copyQueue[i];
|
m_copyQueueIndex = 0;
|
||||||
if (!queue.IsReady())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
|
if (queue.IsReady())
|
||||||
|
{
|
||||||
queue.Reset();
|
queue.Reset();
|
||||||
return &queue;
|
return &queue;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,8 @@ struct CD3D12Device
|
|||||||
ComPtr<ID3D12Device3> m_device;
|
ComPtr<ID3D12Device3> m_device;
|
||||||
ComPtr<ID3D12Heap > m_ivshmemHeap;
|
ComPtr<ID3D12Heap > m_ivshmemHeap;
|
||||||
|
|
||||||
CD3D12CommandQueue m_copyQueue[2];
|
CD3D12CommandQueue m_copyQueue[4];
|
||||||
|
unsigned m_copyQueueIndex = 0;
|
||||||
CD3D12CommandQueue m_computeQueue;
|
CD3D12CommandQueue m_computeQueue;
|
||||||
|
|
||||||
bool HeapTest();
|
bool HeapTest();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user