d3d12: Use graphic queue to download depth buffer

For now go to the easiest solution and improve later
This commit is contained in:
vlj 2015-05-28 23:15:53 +02:00 committed by Vincent Lejeune
parent af69803ee0
commit 74dab18174

View File

@ -1265,14 +1265,8 @@ void D3D12GSRender::semaphorePGRAPHBackendRelease(u32 offset, u32 value)
convertCommandList->Close(); convertCommandList->Close();
m_commandQueueGraphic->ExecuteCommandLists(1, (ID3D12CommandList**)&convertCommandList); m_commandQueueGraphic->ExecuteCommandLists(1, (ID3D12CommandList**)&convertCommandList);
ID3D12Fence *convertDownloadFence;
check( check(
m_device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&convertDownloadFence)) m_device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, m_perFrameStorage.m_commandAllocator, nullptr, IID_PPV_ARGS(&downloadCommandList))
);
m_commandQueueGraphic->Signal(convertDownloadFence, 1);
check(
m_device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_COPY, m_perFrameStorage.m_downloadCommandAllocator, nullptr, IID_PPV_ARGS(&downloadCommandList))
); );
// Copy // Copy
@ -1290,11 +1284,9 @@ void D3D12GSRender::semaphorePGRAPHBackendRelease(u32 offset, u32 value)
downloadCommandList->CopyTextureRegion(&dst, 0, 0, 0, &src, nullptr); downloadCommandList->CopyTextureRegion(&dst, 0, 0, 0, &src, nullptr);
downloadCommandList->Close(); downloadCommandList->Close();
m_commandQueueCopy->Wait(convertDownloadFence, 1); m_commandQueueGraphic->ExecuteCommandLists(1, (ID3D12CommandList**)&downloadCommandList);
m_commandQueueCopy->ExecuteCommandLists(1, (ID3D12CommandList**)&downloadCommandList);
//Wait for result //Wait for result
m_commandQueueCopy->Signal(fence, 1); m_commandQueueGraphic->Signal(fence, 1);
convertDownloadFence->Release();
} }
else else
m_commandQueueGraphic->Signal(fence, 1); m_commandQueueGraphic->Signal(fence, 1);