diff --git a/internal/graphicsdriver/metal/graphics.go b/internal/graphicsdriver/metal/graphics.go index dc4ee3f44..b1459e4e2 100644 --- a/internal/graphicsdriver/metal/graphics.go +++ b/internal/graphicsdriver/metal/graphics.go @@ -379,6 +379,7 @@ func (g *Graphics) flushIfNeeded(present bool) { if g.cb == (mtl.CommandBuffer{}) { return } + g.flushRenderCommandEncoderIfNeeded() if present && g.screenDrawable != (ca.MetalDrawable{}) { g.cb.PresentDrawable(g.screenDrawable) @@ -801,10 +802,6 @@ func (g *Graphics) DrawTriangles(dstID driver.ImageID, srcIDs [graphics.ShaderIm return err } - if dst.screen { - g.flushRenderCommandEncoderIfNeeded() - } - return nil }