mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
PR Feedback MTLCommandBuffer::commit record tweak
MarkResourceFrameReferenced() on the buffer record instead of the resource manager Transfer the frame references on the buffer record to the resource manager when the buffer is committed.
This commit is contained in:
committed by
Baldur Karlsson
parent
149540139a
commit
f8c792d84e
@@ -98,15 +98,16 @@ void WrappedMTLCommandBuffer::commit()
|
||||
Serialise_commit(ser);
|
||||
chunk = scope.Get();
|
||||
}
|
||||
MetalResourceRecord *record = GetRecord(this);
|
||||
record->AddChunk(chunk);
|
||||
MetalResourceRecord *bufferRecord = GetRecord(this);
|
||||
bufferRecord->AddChunk(chunk);
|
||||
|
||||
bool capframe = IsActiveCapturing(m_State);
|
||||
if(capframe)
|
||||
{
|
||||
record->AddRef();
|
||||
GetResourceManager()->MarkResourceFrameReferenced(GetResID(m_WrappedMTLCommandQueue),
|
||||
eFrameRef_Read);
|
||||
bufferRecord->MarkResourceFrameReferenced(GetResID(m_WrappedMTLCommandQueue), eFrameRef_Read);
|
||||
// pull in frame refs from this command buffer
|
||||
bufferRecord->AddResourceReferences(GetResourceManager());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user