Open Bug 2078043 Opened 1 month ago Updated 1 month ago

[wpt-sync] Sync PR 63249 - webgl: Map BACK on the default framebuffer and drop stale errors on swap

Categories

(Core :: Graphics: CanvasWebGL, task, P4)

task

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63249 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63249
Details from upstream follow.

mxmgorin <102797145+mxmgorin@users.noreply.github.com> wrote:

webgl: Map BACK on the default framebuffer and drop stale errors on swap

This makes drawBuffers([BACK]) and readBuffer(BACK) on the default framebuffer use COLOR_ATTACHMENT0, and makes buffer swaps discard a pending GL error instead of panicking. Previously GL rejected BACK for the FBO used by the canvas, so these calls had no effect. In release builds the error also stayed pending until the swap, where surfman failed to create the next surface on macOS.

Testing: conformance2/renderbuffers/readbuffer.html passes one more subtest. Added webgl/drawBuffers-back-default-framebuffer.html, which fails without this change. Also checked on macOS: puzzle.renefloor.nl and wonderforge.pages.dev no longer crash.
Fixes: #<!-- nolink -->48550
Reviewed in servo/servo#48620

Component: web-platform-tests → Graphics: WebGPU
Product: Testing → Core
Component: Graphics: WebGPU → Graphics: CanvasWebGL
You need to log in before you can comment on or make changes to this bug.