mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Sync any pending data uploads before any queue executes on D3D12
This commit is contained in:
@@ -465,6 +465,8 @@ bool WrappedID3D12CommandQueue::Serialise_ExecuteCommandLists(SerialiserType &se
|
||||
{
|
||||
ID3D12CommandQueue *real = Unwrap(pQueue);
|
||||
|
||||
m_pDevice->DataUploadSync();
|
||||
|
||||
if(m_PrevQueueId != GetResID(pQueue))
|
||||
{
|
||||
RDCDEBUG("Previous queue execution was on queue %s, now executing %s, syncing GPU",
|
||||
|
||||
@@ -3926,6 +3926,15 @@ void WrappedID3D12Device::DestroyInternalResources()
|
||||
CloseHandle(m_GPUSyncHandle);
|
||||
}
|
||||
|
||||
void WrappedID3D12Device::DataUploadSync()
|
||||
{
|
||||
if(m_CurDataUpload >= 0)
|
||||
{
|
||||
GPUSync();
|
||||
m_CurDataUpload = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void WrappedID3D12Device::GPUSync(ID3D12CommandQueue *queue, ID3D12Fence *fence)
|
||||
{
|
||||
m_GPUSyncCounter++;
|
||||
|
||||
@@ -972,6 +972,8 @@ public:
|
||||
void ExecuteLists(WrappedID3D12CommandQueue *queue = NULL, bool InFrameCaptureBoundary = false);
|
||||
void FlushLists(bool forceSync = false, ID3D12CommandQueue *queue = NULL);
|
||||
|
||||
void DataUploadSync();
|
||||
|
||||
void GPUSync(ID3D12CommandQueue *queue = NULL, ID3D12Fence *fence = NULL);
|
||||
void GPUSyncAllQueues();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user