{"record":{"id":"1d1aff7982b5b976","repo":"zed-industries/zed","slug":"surface-reports-no-supported-texture-formats-for-a","errorCode":null,"errorMessage":"Surface reports no supported texture formats for adapter {:?}","messagePattern":"Surface reports no supported texture formats for adapter (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_wgpu/src/wgpu_renderer.rs","lineNumber":361,"sourceCode":"        context: &WgpuContext,\n        surface: wgpu::Surface<'static>,\n        config: WgpuSurfaceConfig,\n        compositor_gpu: Option<CompositorGpuHint>,\n        atlas: Arc<WgpuAtlas>,\n    ) -> anyhow::Result<Self> {\n        let surface_caps = surface.get_capabilities(&context.adapter);\n        let preferred_formats = [\n            wgpu::TextureFormat::Bgra8Unorm,\n            wgpu::TextureFormat::Rgba8Unorm,\n        ];\n        let surface_format = preferred_formats\n            .iter()\n            .find(|f| surface_caps.formats.contains(f))\n            .copied()\n            .or_else(|| surface_caps.formats.iter().find(|f| !f.is_srgb()).copied())\n            .or_else(|| surface_caps.formats.first().copied())\n            .ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"Surface reports no supported texture formats for adapter {:?}\",\n                    context.adapter.get_info().name\n                )\n            })?;\n\n        let pick_alpha_mode =\n            |preferences: &[wgpu::CompositeAlphaMode]| -> anyhow::Result<wgpu::CompositeAlphaMode> {\n                preferences\n                    .iter()\n                    .find(|p| surface_caps.alpha_modes.contains(p))\n                    .copied()\n                    .or_else(|| surface_caps.alpha_modes.first().copied())\n                    .ok_or_else(|| {\n                        anyhow::anyhow!(\n                            \"Surface reports no supported alpha modes for adapter {:?}\",\n                            context.adapter.get_info().name\n                        )\n                    })","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui_wgpu/src/wgpu_renderer.rs#L343-L379","documentation":"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).","triggerScenarios":"Thrown at crates/gpui_wgpu/src/wgpu_renderer.rs:361 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}