gfx-rs/wgpu · error

Only FIFO/Auto* is supported on web

Error message

Only FIFO/Auto* is supported on web

What it means

Panic during Surface::configure on the WebGPU backend: the requested PresentMode is Mailbox or Immediate, which browsers do not support (only FIFO family and Auto modes map to the web present model). The faulty input is config.present_mode.

Source

Thrown at wgpu/src/backend/webgpu.rs:4372

        }
    }

    fn configure(&self, device: &dispatch::DispatchDevice, config: &crate::SurfaceConfiguration) {
        let device = device.as_webgpu();

        match self.canvas {
            Canvas::Canvas(ref canvas) => {
                canvas.set_width(config.width);
                canvas.set_height(config.height);
            }
            Canvas::Offscreen(ref canvas) => {
                canvas.set_width(config.width);
                canvas.set_height(config.height);
            }
        }

        if let wgt::PresentMode::Mailbox | wgt::PresentMode::Immediate = config.present_mode {
            panic!("Only FIFO/Auto* is supported on web");
        }
        if let wgt::CompositeAlphaMode::PostMultiplied | wgt::CompositeAlphaMode::Inherit =
            config.alpha_mode
        {
            panic!("Only Opaque/Auto or PreMultiplied alpha mode are supported on web");
        }
        let alpha_mode = match config.alpha_mode {
            wgt::CompositeAlphaMode::PreMultiplied => webgpu_sys::GpuCanvasAlphaMode::Premultiplied,
            _ => webgpu_sys::GpuCanvasAlphaMode::Opaque,
        };
        let mapped = webgpu_sys::GpuCanvasConfiguration::new(
            &device.inner,
            map_texture_format(config.format),
        );
        mapped.set_usage(config.usage.bits());
        mapped.set_alpha_mode(alpha_mode);
        match config.color_space {
            // `Auto` intentionally keeps the browser defaults (colorSpace

View on GitHub (pinned to 3e11ff59bf)

Solutions

  1. Use PresentMode::Fifo or an Auto mode when configuring surfaces on the web
  2. Query supported present modes and fall back to FIFO before calling configure
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at wgpu/src/backend/webgpu.rs:4372 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gfx-rs/wgpu@3e11ff59bf (2026-09-03). Data as JSON: /api/errors/ee40eadda0db4962. Report an issue: GitHub.