zed-industries/zed · error
Surface reports no supported texture formats for adapter {:?
Error message
Surface reports no supported texture formats for adapter {:?} What it means
Raised in the internal `WgpuRenderer` constructor when `surface.get_capabilities(&adapter)` returns an empty formats list, so no texture format (Bgra8Unorm/Rgba8Unorm preferred) can be chosen. Means the adapter and surface are fundamentally incompatible (wrong adapter for the surface's display, or device removed).
Source
Thrown at crates/gpui_wgpu/src/wgpu_renderer.rs:361
context: &WgpuContext,
surface: wgpu::Surface<'static>,
config: WgpuSurfaceConfig,
compositor_gpu: Option<CompositorGpuHint>,
atlas: Arc<WgpuAtlas>,
) -> anyhow::Result<Self> {
let surface_caps = surface.get_capabilities(&context.adapter);
let preferred_formats = [
wgpu::TextureFormat::Bgra8Unorm,
wgpu::TextureFormat::Rgba8Unorm,
];
let surface_format = preferred_formats
.iter()
.find(|f| surface_caps.formats.contains(f))
.copied()
.or_else(|| surface_caps.formats.iter().find(|f| !f.is_srgb()).copied())
.or_else(|| surface_caps.formats.first().copied())
.ok_or_else(|| {
anyhow::anyhow!(
"Surface reports no supported texture formats for adapter {:?}",
context.adapter.get_info().name
)
})?;
let pick_alpha_mode =
|preferences: &[wgpu::CompositeAlphaMode]| -> anyhow::Result<wgpu::CompositeAlphaMode> {
preferences
.iter()
.find(|p| surface_caps.alpha_modes.contains(p))
.copied()
.or_else(|| surface_caps.alpha_modes.first().copied())
.ok_or_else(|| {
anyhow::anyhow!(
"Surface reports no supported alpha modes for adapter {:?}",
context.adapter.get_info().name
)
})View on GitHub (pinned to f4178619ac)
Solutions
- Re-request the adapter with compatible_surface set to this exact surface.
- Recreate the WgpuContext if the device was lost (DeviceLost/OutOfMemory).
- Verify the surface was created with the same instance as the adapter.
- Log the adapter backend and name to diagnose driver/platform-specific incompatibilities.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/gpui_wgpu/src/wgpu_renderer.rs:361 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/1d1aff7982b5b976.
Report an issue: GitHub.