diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2022-07-24 23:15:42 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-08-04 22:38:00 +0000 |
commit | 5d6bc9140ed53eb59e28410e0900f8e07f46d4bd (patch) | |
tree | 92ba2838bc78c26e01b201e00d561a0ca5ac1aeb /src/gui/painting/shaders/backingstorecompose.vert | |
parent | 9258a78b223255b3f778ec356bce88cd1615818c (diff) |
Fix composition of render-to-texture widgets on big endian
Converting from QImage::Format_ARGB32 to QRhiTexture::RGBA8 requires
texture swizzling also on big endian. But unlike on little endian it
is not a red/blue swap that is needed, but a rather rotation of the
alpha channel from the first component to the last.
Add a new swizzling mode to the backingstorecompose fragment shader,
and rename the uniform to reflect that it no longer covers only
red/blue swapping.
Change-Id: I001d275abdc88faaadea16e396ebe032b34e83f0
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit d2fcccd3f1c5e3729c280a6f0a3e12dc9835477b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/painting/shaders/backingstorecompose.vert')
-rw-r--r-- | src/gui/painting/shaders/backingstorecompose.vert | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/shaders/backingstorecompose.vert b/src/gui/painting/shaders/backingstorecompose.vert index bb8444ade5..0c72c97419 100644 --- a/src/gui/painting/shaders/backingstorecompose.vert +++ b/src/gui/painting/shaders/backingstorecompose.vert @@ -9,7 +9,7 @@ layout(std140, binding = 0) uniform buf { mat4 vertexTransform; mat3 textureTransform; float opacity; - int swapRedBlue; + int textureSwizzle; }; void main() |