From 6ec01168d1c517bedf8039ba27f8059ca29478f4 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 6 Jun 2023 12:52:05 +0200 Subject: [PATCH] rhi: gl: Switch back to Nearest filtering when resolving ...for Qt 5 compatibility. It seems both Qt Gui and Quick calls the QOpenGLFramebufferObject helper for blitFramebuffer with the default GL_NEAREST argument for the filtering. In Qt 6 we must use the same if we want to ensure pixel-perfect compatibility. Pick-to: 6.6 6.5 Task-number: QTBUG-113811 Change-Id: I03c69448265e7b0d73f021d71135a1725e96fcbc Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/rhi/qrhigles2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 37e3373c211..774dec310f8 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -3433,7 +3433,7 @@ void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb) f->glBlitFramebuffer(0, 0, cmd.args.blitFromRb.w, cmd.args.blitFromRb.h, 0, 0, cmd.args.blitFromRb.w, cmd.args.blitFromRb.h, GL_COLOR_BUFFER_BIT, - GL_LINEAR); + GL_NEAREST); // Qt 5 used Nearest when resolving samples, stick to that f->glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject()); f->glDeleteFramebuffers(2, fbo); }