Metal: skip waitUntilCompleted when the command buffer is already Completed (#709)

Tiny write-back batches often finish before the wait; checking status avoids redundant ordered-queue round-trips.
This commit is contained in:
kuba
2026-07-31 11:08:56 +02:00
committed by GitHub
parent ec65419c0a
commit 79aa764d03
2 changed files with 27 additions and 3 deletions
@@ -253,7 +253,7 @@ internal static partial class MetalVideoPresenter
if (writeBackBuffers.Count > 0)
{
var committed = FlushBatchedGuestCommands();
MetalNative.SendVoid(committed, MetalNative.Selector("waitUntilCompleted"));
WaitForCommittedCommandBuffer(committed);
WriteBuffersBackToGuest(writeBackBuffers);
}