diff --git a/quest/m1/webgpu-renderer.md b/quest/m1/webgpu-renderer.md index 2e9b17c4895..a2ce61ae3c7 100644 --- a/quest/m1/webgpu-renderer.md +++ b/quest/m1/webgpu-renderer.md @@ -40,13 +40,18 @@ added this quest). Re-planned from issue #703, whose stub quest the default) picks WebGPU where supported, else Canvas2D, and logs the choice. An explicit `"webgpu"` where it is missing refuses loudly; only `"auto"` falls back. -- Device loss: request a new device and rebuild the pipeline. If no adapter - comes back, `"auto"` switches to Canvas2D (logged) rather than going black. - A canvas that acquired a `webgpu` context never returns a `2d` one, even - after device loss, and the canvas is caller-owned (the `` child of - `` or ``, or a transferred `OffscreenCanvas`). Open: - who supplies the replacement surface for this fallback, including in the - worker. Settle it with the maintainer before building the fallback. +- Device loss: request a new device and rebuild the pipeline. A canvas that + acquired a `webgpu` context never returns a `2d` one, and the canvas is + caller-owned, so when no adapter comes back the renderer fails loud: + rendering stops and `out.error` reports `"surface-lost"`. Like the video + source's `out.error`, it is a string union, `undefined` while healthy. + Recovery is a fresh canvas on the existing `canvas` input, which clears + the error; with `"auto"` the renderer then re-selects (Canvas2D if WebGPU + is still gone). `` and + `` do this themselves by swapping their `` child for a + fresh one with the same attributes. In the worker, the main thread + transfers a new `OffscreenCanvas`. Decided 2026-10-08. Rejected: a canvas + factory input (a callback), and a dead renderer the app must rebuild. - The renderer takes an `HTMLCanvasElement` or an `OffscreenCanvas`, so the [watch worker](/quest/m1/watch-worker.md) move transfers the canvas and carries this renderer over unchanged. This lands first, on the main thread, @@ -65,11 +70,12 @@ added this quest). Re-planned from issue #703, whose stub quest the `"webgpu"` refuses where missing), rotation and flip parity between the two paths, device-loss recovery, and the preview's rotation. The fallback test runs in a real browser: paint with WebGPU, lose the device with no - adapter to recover, then check Canvas2D actually paints. + adapter to recover, check `out.error` reports it, then check the element's + swapped canvas actually paints through Canvas2D. Public API: new `@moq/video` package; a `renderer` attribute and option on -`` and ``; the publish preview's renderer moves to -the shared one. Wire: none. +`` and ``; the renderer's `out.error` output; the +publish preview's renderer moves to the shared one. Wire: none. ## Closes