WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
314719
[WPE][GTK] Atlas textures use spec-violating glTexImage2D(internal=GL_RGBA, format=GL_BGRA), render black on strict GLES drivers
https://bugs.webkit.org/show_bug.cgi?id=314719
Summary
[WPE][GTK] Atlas textures use spec-violating glTexImage2D(internal=GL_RGBA, f...
Alejandro G. Castro
Reported
2026-05-13 03:16:40 PDT
SkiaGPUAtlas allocates BitmapTextures with the UseBGRALayout flag, which is meant to give them BGRA storage. BitmapTexture::allocateTexture() and BitmapTexture::reset() currently call: glTexImage2D(target, 0, GL_RGBA, w, h, 0, textureFormat(), UNSIGNED_BYTE, nullptr); where textureFormat() returns GL_BGRA for UseBGRALayout textures. So the actual call for atlas textures is: glTexImage2D(target, 0, GL_RGBA, w, h, 0, GL_BGRA, UNSIGNED_BYTE, nullptr); This combination is undefined per the EXT_texture_format_BGRA8888 spec, which mandates internalFormat == format == GL_BGRA_EXT:
https://registry.khronos.org/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt
Driver behaviour observed: * Mesa (Intel/AMD/llvmpipe): permissive — accepts the call. Downstream rendering happens to come out correct because TextureMapper's shaders swizzle BGRA→RGBA at sample time. * Adreno (Pixel 7, Android arm64): strict — rejects every upload with GL_INVALID_OPERATION (0x502). Confirmed by glGetError() instrumentation: 100% of atlas uploads fail. The texture is left in undefined state, and SkImages::BorrowTextureFrom(..., kRGBA_8888_SkColorType, ...) reading from undefined storage renders solid black on subsequent FALLBACK direct-draws.
Attachments
Add attachment
proposed patch, testcase, etc.
Alejandro G. Castro
Comment 1
2026-05-13 03:45:57 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/64834
EWS
Comment 2
2026-05-17 23:33:11 PDT
Committed
313395@main
(b47541a2e001): <
https://commits.webkit.org/313395@main
> Reviewed commits have been landed. Closing PR #64834 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2026-05-17 23:34:13 PDT
<
rdar://problem/177318630
>
WebKit Commit Bot
Comment 4
2026-05-18 12:14:28 PDT
Re-opened since this is blocked by
bug 315035
Alejandro G. Castro
Comment 5
2026-05-19 09:31:01 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65193
EWS
Comment 6
2026-05-21 01:39:09 PDT
Committed
313653@main
(1f31db09ec64): <
https://commits.webkit.org/313653@main
> Reviewed commits have been landed. Closing PR #65193 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug