Fail fast when a native-WebGPU-project page did not get a native backend.
Without this the project degrades silently: WebGPURenderer swaps in its
WebGL2 backend with only a console warning when no adapter can be had, and
every spec would then pass on WebGL while the run reads as WebGPU coverage.
A SwiftShader adapter (isFallbackAdapter, which is all Playwright's bundled
headless Chromium offers) is refused for the same reason: it runs WGSL, but
on the CPU, at a speed and with limits no user sees.
LUXAR_E2E_WEBGPU_ALLOW_FALLBACK=1 accepts it, for a GPU-less box.
Also hooks the renderer's uncaptured-error callback so getWebGLErrors
has a WebGPU counterpart of the GL error queue to drain.
A no-op outside the native-WebGPU project, outside a test, and for pages that
pinned renderer=webgl or webgpuForceWebgl themselves.
Parameters
page: Page
Playwright page, after __luxarDebug.getState().initialized
Fail fast when a native-WebGPU-project page did not get a native backend.
Without this the project degrades silently:
WebGPURendererswaps in its WebGL2 backend with only a console warning when no adapter can be had, and every spec would then pass on WebGL while the run reads as WebGPU coverage. A SwiftShader adapter (isFallbackAdapter, which is all Playwright's bundled headless Chromium offers) is refused for the same reason: it runs WGSL, but on the CPU, at a speed and with limits no user sees.LUXAR_E2E_WEBGPU_ALLOW_FALLBACK=1accepts it, for a GPU-less box.Also hooks the renderer's uncaptured-error callback so getWebGLErrors has a WebGPU counterpart of the GL error queue to drain.
A no-op outside the native-WebGPU project, outside a test, and for pages that pinned
renderer=webglorwebgpuForceWebglthemselves.