Skip to content

WebGPU on Safari: SDF text renders empty, and the driver is non-deterministic #470

Description

@Exoridus

Two defects keep backend: 'auto' from choosing WebGPU on WebKit. Both were found while fixing the canvas-upload no-op; neither is fixed. Users are unaffected — auto selects WebGL2 on WebKit, where the same scenes render correctly — so this only blocks re-enabling WebGPU there.

1. text/sdf-glyphs renders as an empty frame

No validation error, nothing drawn. Ruled out by bare-metal probes against real Safari, each verified working in isolation:

  • canvas-sourced texture upload (text's SDF atlas is a DataTexture, not canvas-backed)
  • the r8unorm format itself
  • the storage-buffer read-after-write pattern
  • the fragmentSdf shader

That leaves WebGpuTextRenderer's own orchestration — flush() and _getTexBindGroup() — as the remaining suspect. Not yet isolated.

2. The driver appears non-deterministic

Re-running the full parity matrix against real Safari fails a different set of scenes each time, including previously-clean ones unrelated to the text or canvas paths (e.g. sprite/origin, a DataTexture scene). No engine-side pattern; this looks like WebKit's WebGPU implementation rather than our code, and may not be fixable from here.

Where the gate lives

Application.canUseWebGpu() excludes WebKit via isWebKitUserAgent. Both the check and this issue should go once the parity matrix comes back clean on Safari. backend: 'webgpu' still selects it explicitly for anyone investigating.

Needs real Safari on macOS — neither symptom reproduces in Chromium or under any simulator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions