Documentation
    Preparing search index...

    Interface Gpu

    navigator.gpu, reduced to what this backend calls.

    interface Gpu {
        getPreferredCanvasFormat?(): string;
        requestAdapter(
            options?: { powerPreference?: string },
        ): Promise<GpuAdapter | null>;
    }
    Index
    • The format the host prefers for a canvas swap chain — commonly "bgra8unorm", not "rgba8unorm" (§60a; see webgpu-renderer.ts on why that never widens RenderTargetFormat). Optional: a double may omit it, and the backend falls back to "bgra8unorm".

      Returns string

    • Requests an adapter; resolves null where WebGPU is present but unusable.

      Parameters

      • Optionaloptions: { powerPreference?: string }

      Returns Promise<GpuAdapter | null>