Summary: | When Angle is enabled, images painted by QPainter have Red and Blue channels swapped | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Halla Rempt <halla> |
Component: | OpenGL Canvas | Assignee: | Dmitry Kazakov <dimula73> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alvin, griffinvalley |
Priority: | NOR | Keywords: | regression, release_blocker, triaged |
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
URL: | https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-74968 | ||
Latest Commit: | https://commits.kde.org/krita/0cf7c069e3dcf09b82e9ab53be72aa3fff9c7d4e | Version Fixed In: |
Description
Halla Rempt
2019-04-03 19:05:03 UTC
thanks for reporting this, we were wondering if you were going to during the meeting :) Now to find someone to confirm :) I can reproduce it with my local build (4689792). R and B channels are swapped when using ANGLE. It happens on both the Intel UHD 620 and the NVIDIA MX150 GPUs. Everything's normal when using OpenGL. Image is 16-bit integer, canvas display format is sRGB (8bit). I don't have HDR. (In reply to Alvin Wong from comment #2) > I can reproduce it with my local build (4689792). > > R and B channels are swapped when using ANGLE. It happens on both the Intel > UHD 620 and the NVIDIA MX150 GPUs. > > Everything's normal when using OpenGL. > > Image is 16-bit integer, canvas display format is sRGB (8bit). I don't have > HDR. Sorry, I should clarify that the channels are flipped for the reference images. The image itself is displayed normally. Converting the image to 8-bit integer or 16-bit float doesn't change anything. (Couldn't try 32-bit float 'cause it crashed...) I remember adding some code to do colour swizzling with certain surface formats for ANGLE; perhaps it has something to do with this (though the code must have changed a lot by now). This happens when painting QImages using QPainter on the opengl/angle canvas: I wonder whether it isn't just something caused by a change in Qt 5.12... Yes, I can confirm on ATI GPU as well. It might be my HDR patches... Git commit 0cf7c069e3dcf09b82e9ab53be72aa3fff9c7d4e by Dmitry Kazakov. Committed on 04/04/2019 at 16:40. Pushed by dkazakov into branch 'master'. Fix swizzling when rendering QPainter on QOpenGLWidget with Angle OpenGLES specification does not support GL_TEXTURE_SWIZZLE_RGBA, it supports only per-channel calls. And since Qt supports QpenGLES, it should use the latter approach only. See the upstream patch review: https://codereview.qt-project.org/#/c/258193/ A +120 -0 3rdparty/ext_qt/0006-Fix-swizzling-when-rendering-QPainter-on-QOpenGLWidg.patch M +2 -0 3rdparty/ext_qt/CMakeLists.txt https://commits.kde.org/krita/0cf7c069e3dcf09b82e9ab53be72aa3fff9c7d4e |