mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-09 00:01:07 +00:00
Split large pending cmd batches to prevent device removal on load
This commit is contained in:
committed by
Baldur Karlsson
parent
2629a8b096
commit
b9c82bd4fb
@@ -3431,7 +3431,11 @@ void WrappedID3D12Device::ExecuteLists(WrappedID3D12CommandQueue *queue, bool In
|
||||
if(queue == NULL)
|
||||
queue = GetQueue();
|
||||
|
||||
queue->ExecuteCommandListsInternal((UINT)cmds.size(), &cmds[0], InFrameCaptureBoundary, false);
|
||||
for(size_t i = 0; i < cmds.size(); i += executeListsMaxSize)
|
||||
{
|
||||
UINT cmdCount = RDCMIN(executeListsMaxSize, (UINT)(cmds.size() - i));
|
||||
queue->ExecuteCommandListsInternal(cmdCount, &cmds[i], InFrameCaptureBoundary, false);
|
||||
}
|
||||
|
||||
m_InternalCmds.submittedcmds.append(m_InternalCmds.pendingcmds);
|
||||
m_InternalCmds.pendingcmds.clear();
|
||||
|
||||
@@ -848,6 +848,10 @@ public:
|
||||
int initStateCurBatch;
|
||||
ID3D12GraphicsCommandListX *initStateCurList;
|
||||
|
||||
// ExecuteLists may issue this many command lists together. If more than this are
|
||||
// pending at once then they will be split up and issued in multiple calls.
|
||||
static const UINT executeListsMaxSize = 50;
|
||||
|
||||
ID3D12GraphicsCommandListX *GetNewList();
|
||||
ID3D12GraphicsCommandListX *GetInitialStateList();
|
||||
void CloseInitialStateList();
|
||||
|
||||
Reference in New Issue
Block a user