From f27d8ac03e569728c5861a366853b8a3ffcfe215 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 3 Apr 2023 13:00:43 +0200 Subject: rhi: gl: Reset scissor before blit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit glBlitFramebuffer is affected by the scissor test. Fixes: QTBUG-103792 Change-Id: I2eccc9f3e469af8b2fdff22e9fb7c2311c25b867 Reviewed-by: Christian Strømme (cherry picked from commit 33b7a3b8466bfc76a33d638c9d1d00d242c438d2) Reviewed-by: Qt Cherry-pick Bot --- src/gui/rhi/qrhigles2.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 10ff4b7179..49799599ce 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -3335,6 +3335,10 @@ void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb) break; case QGles2CommandBuffer::Command::BlitFromRenderbuffer: { + // Altering the scissor state, so reset the stored state, although + // not strictly required as long as blit is done in endPass() only. + cbD->graphicsPassState.reset(); + f->glDisable(GL_SCISSOR_TEST); GLuint fbo[2]; f->glGenFramebuffers(2, fbo); f->glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo[0]); -- cgit v1.2.1