mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 22:41:18 +12:00
fix: index buffer crashes
This commit is contained in:
parent
97b806f16f
commit
d086eb3db5
2 changed files with 2 additions and 8 deletions
|
@ -224,7 +224,7 @@ void MetalSynchronizedHeapAllocator::CleanupBuffer(MTL::CommandBuffer* latestFin
|
|||
// release allocations
|
||||
for (auto& addr : it->second)
|
||||
m_chunkedHeap.free(addr);
|
||||
it = m_releaseQueue.erase(it);
|
||||
m_releaseQueue.erase(it);
|
||||
}
|
||||
|
||||
void MetalSynchronizedHeapAllocator::GetStats(uint32& numBuffers, size_t& totalBufferSize, size_t& freeBufferSize) const
|
||||
|
|
|
@ -1816,7 +1816,6 @@ void MetalRenderer::CommitCommandBuffer()
|
|||
void MetalRenderer::ProcessFinishedCommandBuffers()
|
||||
{
|
||||
// Check for finished command buffers
|
||||
bool atLeastOneCompleted = false;
|
||||
for (auto it = m_executingCommandBuffers.begin(); it != m_executingCommandBuffers.end();)
|
||||
{
|
||||
auto commandBuffer = *it;
|
||||
|
@ -1825,17 +1824,12 @@ void MetalRenderer::ProcessFinishedCommandBuffers()
|
|||
m_memoryManager->CleanupBuffers(commandBuffer);
|
||||
commandBuffer->release();
|
||||
it = m_executingCommandBuffers.erase(it);
|
||||
atLeastOneCompleted = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
// Invalidate indices if at least one command buffer has completed
|
||||
if (atLeastOneCompleted)
|
||||
LatteIndices_invalidateAll();
|
||||
}
|
||||
|
||||
bool MetalRenderer::AcquireDrawable(bool mainWindow)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue