summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2023-04-03 13:00:43 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-04-11 23:30:46 +0000
commitf27d8ac03e569728c5861a366853b8a3ffcfe215 (patch)
tree985b95f2a156d9ebd13fe8cd0196276dde7e186f /src
parentbaaf1244ef6c0035a617f1e507f82ebeaaafcc34 (diff)
downloadqtbase-f27d8ac03e569728c5861a366853b8a3ffcfe215.tar.gz
rhi: gl: Reset scissor before blit
glBlitFramebuffer is affected by the scissor test. Fixes: QTBUG-103792 Change-Id: I2eccc9f3e469af8b2fdff22e9fb7c2311c25b867 Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 33b7a3b8466bfc76a33d638c9d1d00d242c438d2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/gui/rhi/qrhigles2.cpp4
1 files changed, 4 insertions, 0 deletions
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]);