mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add an extra GPU sync between submissions on different queues
* If the application did some CPU side synchronisation that's not visible in the capture (unlike a queue Wait() which we replay as a GPU sync) then there might be overlap that causes simultaneous use problems. So instead we sync between submissions on different queues to ensure we don't overlap by accident.
This commit is contained in:
@@ -96,6 +96,7 @@ class WrappedID3D12CommandQueue : public ID3D12CommandQueue,
|
||||
// command recording/replay data shared between queues and lists
|
||||
D3D12CommandData m_Cmd;
|
||||
|
||||
ResourceId m_PrevQueueId;
|
||||
ResourceId m_BackbufferID;
|
||||
|
||||
void ProcessChunk(uint64_t offset, D3D12ChunkType context);
|
||||
|
||||
@@ -143,8 +143,20 @@ bool WrappedID3D12CommandQueue::Serialise_ExecuteCommandLists(UINT NumCommandLis
|
||||
ID3D12CommandQueue *real = NULL;
|
||||
|
||||
if(m_State <= EXECUTING)
|
||||
{
|
||||
real = Unwrap(GetResourceManager()->GetLiveAs<ID3D12CommandQueue>(queueId));
|
||||
|
||||
if(m_PrevQueueId != queueId)
|
||||
{
|
||||
RDCDEBUG("Previous queue execution was on queue %llu, now executing %llu, syncing GPU",
|
||||
m_PrevQueueId, queueId);
|
||||
if(m_PrevQueueId != ResourceId())
|
||||
m_pDevice->GPUSync(GetResourceManager()->GetLiveAs<ID3D12CommandQueue>(m_PrevQueueId));
|
||||
|
||||
m_PrevQueueId = queueId;
|
||||
}
|
||||
}
|
||||
|
||||
if(m_State == READING)
|
||||
{
|
||||
for(uint32_t i = 0; i < numCmds; i++)
|
||||
|
||||
Reference in New Issue
Block a user