[qt/qt/qtmultimedia]: Summary of bulk changes made

KDE Git Services - Bulk Change <[email protected]> Wed, 5 Aug 2026 06:16:07 +0000 (UTC)
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git repository change summary for qt/qt/qtmultimedia
Pushed by mirror-service into branch 'dev'.
Changed from b864693dcad84695ee898774cb4b6b787e5aa24f to b090b3b3e41af09757d621949d2f3ba194f78a61
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.

This change contains the following new commits:

Git commit b090b3b3e41af09757d621949d2f3ba194f78a61 by Lorn Potter on 05/08/2026 at 00:24..
Fall back to RGBA8 textures when BGRA8 is unsupported

Frames in the BGRA8888, BGRA8888_Premultiplied and BGRX8888 pixel
formats request a QRhiTexture::BGRA8 texture. On OpenGL ES backends
without EXT_texture_format_BGRA8888, which includes every WebGL 2
context, that format does not exist. resolvedRhiTextureFormat() had no
fallback for it, so it hit the default branch, returned UnknownFormat,
and the caller then went ahead with the unsupported preferred format.
The glTexSubImage2D() call with GL_BGRA is rejected, the texture never
receives any data, and the video output stays black even though the
frames arrive intact.

Fall back to RGBA8 in that case, and select the bgra fragment shader
whenever BGRA8 is unsupported: a BGRA texture has its channels
reordered by the driver on upload, whereas the same data in an RGBA8
texture reaches the shader as BGRA and has to be swizzled there. That
shader already exists and is used for the Jpeg path.

Backends that support BGRA8 keep the previous texture format and
shader, so only the affected ones change behavior.

This is easiest to hit with QVideoFrame(QImage), since ARGB32 and
RGB32 map to BGRA8888 and BGRX8888 on little-endian systems, for
example when pushing frames through QVideoFrameInput on WebAssembly.

Add a regression test to tst_qvideoframecolormanagement that emulates
the missing format via setExcludedRhiTextureFormats() and verifies the
BGRA8 -> RGBA8 fallback renders the same output as a native BGRA8
texture.

This patch and its commit message were developed together with Claude

Change-Id: Ib4d240051bac024198e8ed411a2ee97e23ae2e8e
Reviewed-by: Artem Dyomin <[email protected]>
Reviewed-by: Mikko Hallamaa <[email protected]>
https://invent.kde.org/qt/qt/qtmultimedia/-/commit/b090b3b3e41af09757d621949d2f3ba194f78a61