From b36c21648fa934516d3154e8546cd51140e1b001 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 13 Sep 2022 08:42:55 -0700 Subject: [PATCH] internal/restorable: refactoring: remove a redundant FlushCommands call readPixelsFromGPU already flushes commands. --- internal/restorable/image.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/restorable/image.go b/internal/restorable/image.go index d75fc0bd5..c4c6766dc 100644 --- a/internal/restorable/image.go +++ b/internal/restorable/image.go @@ -450,9 +450,6 @@ func (i *Image) appendDrawTrianglesHistory(srcs [graphics.ShaderImageCount]*Imag func (i *Image) readPixelsFromGPUIfNeeded(graphicsDriver graphicsdriver.Graphics) error { if len(i.drawTrianglesHistory) > 0 || i.stale { - if err := graphicscommand.FlushCommands(graphicsDriver); err != nil { - return err - } if err := i.readPixelsFromGPU(graphicsDriver); err != nil { return err }