From 8abc922e89f49f9dd703d0a8819cf9f76e17f783 Mon Sep 17 00:00:00 2001 From: Zyko <13394516+Zyko0@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:03:42 +0200 Subject: [PATCH] Always take the first destination image + comment --- internal/graphicscommand/commandqueue.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/internal/graphicscommand/commandqueue.go b/internal/graphicscommand/commandqueue.go index 92fe21eb9..d38853f0c 100644 --- a/internal/graphicscommand/commandqueue.go +++ b/internal/graphicscommand/commandqueue.go @@ -330,13 +330,8 @@ func (q *commandQueue) prependPreservedUniforms(uniforms []uint32, shader *Shade copy(uniforms[graphics.PreservedUniformUint32Count:], origUniforms) // Set the destination texture size. - var dw, dh int - for _, dst := range dsts { - if dst != nil { - dw, dh = dst.InternalSize() - break - } - } + // The number of destination images is always 1 but this might change in the future. + dw, dh := dsts[0].InternalSize() uniforms[0] = math.Float32bits(float32(dw)) uniforms[1] = math.Float32bits(float32(dh)) uniformIndex := 2