release unused buffers

This commit is contained in:
Samuliak 2024-08-28 16:42:55 +02:00
parent 35740c5c8e
commit a6c8d83436
2 changed files with 109 additions and 113 deletions

View file

@ -264,10 +264,7 @@ void MetalRenderer::SwapBuffers(bool swapTV, bool swapDRC)
m_memoryManager->GetFramePersistentBufferAllocator().ResetAllocations();
// Unlock all temporary buffers
m_memoryManager->GetTemporaryBufferAllocator().UnlockAllBuffers();
// Check for completed command buffers
m_memoryManager->GetTemporaryBufferAllocator().CheckForCompletedCommandBuffers();
m_memoryManager->GetTemporaryBufferAllocator().EndFrame();
}
// TODO: use `shader` for drawing
@ -504,7 +501,7 @@ void MetalRenderer::texture_clearSlice(LatteTexture* hostTexture, sint32 sliceIn
}
}
// TODO: do a GPU blit even on unified memory? That would mean we could use private storage mode for all textures
// TODO: do a cpu copy on Apple Silicon?
void MetalRenderer::texture_loadSlice(LatteTexture* hostTexture, sint32 width, sint32 height, sint32 depth, void* pixelData, sint32 sliceIndex, sint32 mipIndex, uint32 compressedImageSize)
{
auto textureMtl = (LatteTextureMtl*)hostTexture;