[wpt-sync] Sync PR 62992 - webgl: Initialize stencil writemask to all ones and restore clear values
Categories
(Core :: Graphics: CanvasWebGL, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62992 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62992
Details from upstream follow.
mxmgorin <102797145+mxmgorin@users.noreply.github.com> wrote:
webgl: Initialize stencil writemask to all ones and restore clear values
This fixes two issues in the state restored by the WebGL thread after binding or initializing a framebuffer:
- The initial stencil writemask was zero instead of all ones. Creating a context and binding a framebuffer restore it from
GLState, so stencil writes were dropped until the page calledstencilMask, andgetParameter(STENCIL_WRITEMASK)returned 0.restore_invariantdid not restore the depth and stencil clear values. The first clear of a framebuffer created by the page lazily initializes its attachments withclearDepth(1)andclearStencil(0), so aclearDepthorclearStencilset before that clear was replaced by the defaults.Testing: Added
mozilla/webgl/framebuffer-initial-state.html. All four of its subtests fail without this change.
conformance2/rendering/blitframebuffer-stencil-only.htmlnow passes in full, so its expectations are removed.
Found while testing the web version of FTL from Humble Bundle, whose map renders empty without this change.
Reviewed in servo/servo#48423
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=97876
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 10 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 12 tests
Status Summary
Firefox
OK : 1
PASS: 4
Chrome
OK : 1
PASS: 4
Safari
OK : 1
PASS: 4
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /webgl/basic-unused-context-crash.html [wpt.fyi]:
SKIP - /webgl/bufferSubData.html [wpt.fyi]:
SKIP - /webgl/compressed-tex-sub-image-2d-without-base-image.html [wpt.fyi]:
SKIP - /webgl/compressedTexImage2D.html [wpt.fyi]:
SKIP - /webgl/compressedTexSubImage2D.html [wpt.fyi]:
SKIP - /webgl/drawingBufferToneMapping.html [wpt.fyi]:
SKIP - /webgl/framebuffer-initial-state.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] (Chrome:OK, Safari:OK) - /webgl/idlharness.any.worker.html [wpt.fyi]:
SKIP - /webgl/idlharness.any.html [wpt.fyi]:
SKIP - /webgl/texImage2D.html [wpt.fyi]:
SKIP - /webgl/texSubImage2D.html [wpt.fyi]:
SKIP - /webgl/uniformMatrixNfv.html [wpt.fyi]:
SKIP
Tests Disabled in Gecko Infrastructure
- /webgl/basic-unused-context-crash.html [wpt.fyi]:
SKIP - /webgl/bufferSubData.html [wpt.fyi]:
SKIP - /webgl/compressed-tex-sub-image-2d-without-base-image.html [wpt.fyi]:
SKIP - /webgl/compressedTexImage2D.html [wpt.fyi]:
SKIP - /webgl/compressedTexSubImage2D.html [wpt.fyi]:
SKIP - /webgl/drawingBufferToneMapping.html [wpt.fyi]:
SKIP - /webgl/framebuffer-initial-state.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] (Chrome:OK, Safari:OK) - /webgl/idlharness.any.worker.html [wpt.fyi]:
SKIP - /webgl/idlharness.any.html [wpt.fyi]:
SKIP - /webgl/texImage2D.html [wpt.fyi]:
SKIP - /webgl/texSubImage2D.html [wpt.fyi]:
SKIP - /webgl/uniformMatrixNfv.html [wpt.fyi]:
SKIP
Updated•1 month ago
|
Comment 4•1 month ago
|
||
| bugherder | ||
Description
•