[Linux/Wayland] DMABuf WebGL color corruption still present in Firefox 159.0.1 on Intel UHD 730
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox160 | --- | fixed |
| firefox161 | --- | fixed |
| firefox162 | --- | fixed |
People
(Reporter: marc.nuechter, Assigned: lsalzman)
References
(Regression)
Details
(Keywords: regression)
Attachments
(17 files, 3 external files)
|
9.50 KB,
text/html
|
Details | |
|
210.93 KB,
image/png
|
Details | |
|
90.05 KB,
image/png
|
Details | |
|
159.46 KB,
text/plain
|
Details | |
|
1.96 KB,
text/plain
|
Details | |
|
1.14 MB,
image/png
|
Details | |
|
2.52 MB,
image/png
|
Details | |
|
1.20 MB,
image/png
|
Details | |
|
2.67 MB,
image/png
|
Details | |
|
17.26 KB,
text/html
|
Details | |
|
3.53 KB,
text/plain
|
Details | |
|
134.51 KB,
image/png
|
Details | |
|
134.51 KB,
image/png
|
Details | |
|
227.97 KB,
image/png
|
Details | |
|
4.88 KB,
text/plain
|
Details | |
|
134.74 KB,
image/png
|
Details | |
|
156.47 KB,
image/png
|
Details |
Additional hardware information:
OS: Kubuntu 26.04
Desktop environment: KDE Plasma
Display server: Wayland
CPU: Intel Core i5-13400
GPU: Intel UHD Graphics 730 (ADL-S GT1)
Graphics driver: Mesa 26.0.8-1ubuntu0.3
OpenGL: 4.6
Firefox: 159.0.1
Application affected: Elvenar browsergame
https://bugzilla.mozilla.org/show_bug.cgi?id=2087301
The issue is still reproducible with Intel integrated graphics.
White and yellow colors are incorrectly rendered as blue.
Workaround: Setting widget.dmabuf-webgl.enabled to false in about:config and completely restarting Firefox fixes the issue.
This suggests that the fix included in Firefox 159.0.1 does not resolve the problem on all Intel graphics configurations.
Comment 1•15 days ago
|
||
Comment 2•15 days ago
|
||
Thanks for the report. The symptoms look different from bug 2087301. That bug swapped red and blue, but white can't turn blue from a channel swap, so this may be a separate issue. Could you help us narrow it down?
- Open the attached diagnostic page on this bug. When it says "Done", click "Copy results" and paste the text here. Please also attach a screenshot of the whole page, because some problems only show on screen.
- Tell us exactly where in Elvenar you see the wrong colours: the URL, which screen or part of the game, and what you do to make it happen. Does it happen immediately or only after a while?
- Attach a screenshot, or better a short screen recording, of the wrong colours in Elvenar, with a screenshot of the same view looking correct (for example with widget.dmabuf-webgl.enabled set to false) for comparison.
- Attach the full about:support output ("Copy raw data to clipboard").
- With widget.dmabuf-webgl.enabled back at its default, set gfx.canvas.accelerated to false, restart Firefox, and say whether Elvenar still shows wrong colours.
- Did this happen in Firefox 158 or earlier, or only starting with 159? If you can, a mozregression run (https://mozilla.github.io/mozregression/) would help a lot.
Comment 7•15 days ago
|
||
Thanks for running the diagnostic and for the about:support. Everything on the test page passed and the directly displayed WebGL canvases look correct, so basic WebGL rendering is fine on your system. Elvenar must be doing something the test page doesn't cover.
One thing from about:support: the Firefox Snap uses its own bundled Mesa (25.2.8), not your system's Mesa 26.0.8. Could you also try the Firefox tarball from https://www.mozilla.org/firefox/linux/, which uses your system Mesa, and say whether Elvenar still shows wrong colours?
We also still need:
- Where in Elvenar you see the wrong colours (URL, which screen, what you do), and a screenshot or short screen recording of it, plus one of the same view looking correct with widget.dmabuf-webgl.enabled set to false.
- Whether Elvenar still shows wrong colours with widget.dmabuf-webgl.enabled back at its default and gfx.canvas.accelerated set to false (restart Firefox after changing it).
- Whether this happened in Firefox 158 or earlier, or only starting withย 159.
> Tell us exactly where in Elvenar you see the wrong colours: the URL, which screen or part of the game, and what you do to make it happen. Does it happen immediately or only after a while?
https://de7.elvenar.com/game.
The wrong colors starting immediately in the complete Game
It startet the first time direct after the update to 159.0.1 never before
| Reporter | ||
Comment 10•15 days ago
|
||
| Reporter | ||
Comment 11•15 days ago
|
||
| Reporter | ||
Comment 12•15 days ago
|
||
| Reporter | ||
Comment 13•15 days ago
|
||
_With widget.dmabuf-webgl.enabled back at its default, set gfx.canvas.accelerated to false, restart Firefox, and say whether Elvenar still shows wrong colours._
with gfx.canvas.acceleratd the colors are correct.
When I disable hardware acceleration in Firefox's settings, the colors are displayed correctly as well.
For the mozregression run i will need more Time to figure out what exactly I need to do. I hope tomorrow
Comment 14•15 days ago
|
||
Comment 15•15 days ago
|
||
Thank you again for taking the time to test all of this. It helps us a lot, and we know it takes time.
Did you see the blue colors in Firefox 159.0, or was 159.0.1 the first version where you saw them?
If you have time, please test both versions:
- In your current Firefox, open the new attached test page (bug2089043_diagnostic_v3.html ). When it says "Done", click "Copy results" and paste the text here, with a screenshot.
- Close Firefox. Open a terminal and run: sudo snap revert firefox
- Start Firefox. Open about:support and write down the version number. If it is not 159.0, please tell us which version it is.
- Open Elvenar. Are the colors correct or blue? Then open the v3 test page again and paste the results with a screenshot.
- To go back to the newest version, close Firefox and run: sudo snap refresh firefox
| Reporter | ||
Comment 16•15 days ago
|
||
| Reporter | ||
Comment 17•15 days ago
|
||
| Reporter | ||
Comment 18•15 days ago
|
||
| Reporter | ||
Comment 19•15 days ago
|
||
| Reporter | ||
Comment 20•15 days ago
|
||
Did you see the blue colors in Firefox 159.0, or was 159.0.1 the first version where you saw them?
159.0.1 was the first time.
| Reporter | ||
Comment 21•15 days ago
|
||
Comment 22•15 days ago
|
||
Thank you, Marc, for all your help and for answering so quickly. The v3 result is very useful. Test B1 shows the problem: when a large (accelerated) 2D canvas is uploaded into WebGL with texImage2D, red and blue are swapped. A small 2D canvas (B2) is correct.
When you have time, please run the same test page after sudo snap revert firefox (version 159.0) and paste the results. That will confirm the change between 159.0 and 159.0.1.
| Reporter | ||
Comment 23•15 days ago
|
||
| Reporter | ||
Comment 24•15 days ago
|
||
Comment 25•15 days ago
|
||
Abhinav, Lee: B1 in attachment bug2089043_diagnostic_v3.html reproduces this on the reporter's 159.0.1, and the reporter says 159.0 was fine. The path is TexUnpackSurface::TexOrSubImage with a SurfaceDescriptorCanvasSurface source: the descriptor exported by CanvasManagerParent::GetCanvasSurface goes to BlitSd, then BlitSdToFramebuffer, then GLBlitHelper::Blit(DMABufSurface*), with destFormat left UNKNOWN. Since the bug 2087301 fix, srcIsBGRA is true for a BGRA DMABuf, so an UNKNOWN destination now gets swapped where it didn't before. Abhinav, could you run B1 on your AMD setup with and without D338339 to confirm?
Updated•15 days ago
|
Comment 26•15 days ago
|
||
Thank you very much, Marc. This was exactly the test we needed.
The results from 159.0 and 159.0.1 show the change clearly:
- 159.0: test A (drawImage of a WebGL canvas into an accelerated 2D canvas) has red/blue swapped. That is bugย 2087301. Test B1 (texImage2D of an accelerated 2D canvas) is correct.
- 159.0.1: test A is correct, but B1 has red/blue swapped.
So the bug 2087301 fix moved the swap from one path to the other. Elvenar uses the B1 path, which is why it broke in 159.0.1.
Updated•15 days ago
|
| Reporter | ||
Comment 27•15 days ago
|
||
after sudo snap revert firefox (version 159.0)
the colors in Elvenar are fine
Comment 28•15 days ago
|
||
Thanks Marc! I think we have everything we need from you. We need to make a fix for this now.
| Reporter | ||
Comment 29•15 days ago
|
||
Thank you.
What does that mean for me?
I'll switch back to 159.0.1, and sooner or later there will be an update that fixes the bug?
Comment 30•15 days ago
|
||
There will be an update that fixes the bug sooner rather than later, but I'm not sure exactly which version or when. Less than two weeks most likely.
Updated•15 days ago
|
Comment 31•14 days ago
|
||
Since this seems like it makes a site unusable in Firefox I am setting this to S2 in triage.
| Assignee | ||
Comment 32•14 days ago
|
||
The surface format of single-plan DMABuf surfaces is currently an unreliable
way to determine whether to do a BGRA swizzle. For now, avoid doing a swizzle
on such surfaces.
Updated•14 days ago
|
Comment 33•14 days ago
|
||
Comment 34•14 days ago
|
||
| bugherder | ||
| Assignee | ||
Updated•13 days ago
|
Comment 35•13 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Distorted Canvas2D rendering on Linux
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Avoids doing a swizzle on certain rendering paths that are problematic.
- String changes made/needed?: None
- Is Android affected?: no
| Assignee | ||
Comment 36•13 days ago
|
||
The surface format of single-plane DMABuf surfaces is currently an unreliable
way to determine whether to do a BGRA swizzle. For now, avoid doing a swizzle
on such surfaces.
Original Revision: https://phabricator.services.mozilla.com/D340202
Comment 37•11 days ago
|
||
:lsalzman, could you consider a release uplift request? We could take it in the planned Fx160 dot release
Updated•11 days ago
|
Updated•10 days ago
|
Updated•10 days ago
|
Comment 38•10 days ago
|
||
| uplift | ||
| Assignee | ||
Comment 39•10 days ago
|
||
The surface format of single-plane DMABuf surfaces is currently an unreliable
way to determine whether to do a BGRA swizzle. For now, avoid doing a swizzle
on such surfaces.
Original Revision: https://phabricator.services.mozilla.com/D340202
Updated•10 days ago
|
Comment 40•10 days ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: Distorted Canvas2D rendering on Linux. It will be several weeks before 161 is released, during which Linux users will have broken Canvas2D rendering. It seems safe enough to uplift this fix to release to resolve the issue. This fix and the bug itself do not affect other platforms, regardless, which adds an extra margin of safety to uplifting the fix.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Avoids doing a swizzle on certain rendering paths that are problematic.
- String changes made/needed?: None
- Is Android affected?: no
| Assignee | ||
Updated•10 days ago
|
Updated•7 days ago
|
Updated•7 days ago
|
Comment 45•7 days ago
|
||
| uplift | ||
Updated•4 days ago
|
Updated•3 days ago
|
Description
•