{"record":{"id":"f053c22432fc353a","repo":"gfx-rs/wgpu","slug":"failed-to-get-egl-1-5-for-surfaceless","errorCode":null,"errorMessage":"Failed to get EGL 1.5 for surfaceless","messagePattern":"Failed to get EGL 1\\.5 for surfaceless","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/gles/egl.rs","lineNumber":880,"sourceCode":"                        xcb_display_handle\n                            .connection\n                            .map_or(khronos_egl::DEFAULT_DISPLAY, ptr::NonNull::as_ptr),\n                        &display_attributes,\n                    )\n                }\n                .map_err(instance_err(\"failed to get XCB display\"))?;\n                (display, WindowKind::X11)\n            }\n            x if client_ext_str.contains(\"EGL_MESA_platform_surfaceless\") => {\n                log::debug!(\n                    \"No (or unknown) windowing system ({x:?}) present. Using surfaceless platform\"\n                );\n                #[allow(\n                    clippy::unnecessary_literal_unwrap,\n                    reason = \"this is only a literal on Emscripten\"\n                )]\n                // TODO: This extension is also supported on EGL 1.4 with EGL_EXT_platform_base: https://registry.khronos.org/EGL/extensions/MESA/EGL_MESA_platform_surfaceless.txt\n                let egl = egl1_5.expect(\"Failed to get EGL 1.5 for surfaceless\");\n                let display = unsafe {\n                    egl.get_platform_display(\n                        EGL_PLATFORM_SURFACELESS_MESA,\n                        khronos_egl::DEFAULT_DISPLAY,\n                        &[khronos_egl::ATTRIB_NONE],\n                    )\n                }\n                .map_err(instance_err(\"failed to get MESA surfaceless display\"))?;\n                (display, WindowKind::Unknown)\n            }\n            x => {\n                log::debug!(\n                    \"No (or unknown) windowing system {x:?} and EGL_MESA_platform_surfaceless not available. Using default platform\"\n                );\n                let display =\n                    unsafe { egl.get_display(khronos_egl::DEFAULT_DISPLAY) }.ok_or_else(|| {\n                        crate::InstanceError::new(\"Failed to get default display\".into())\n                    })?;","sourceCodeStart":862,"sourceCodeEnd":898,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/gles/egl.rs#L862-L898","documentation":"Panic in GLES Instance::init: creating an EGL display for the surfaceless (EGL_MESA_platform_surfaceless) platform requires EGL 1.5, but the loaded EGL does not provide it, so initialization of that path cannot continue.","triggerScenarios":"Thrown at wgpu-hal/src/gles/egl.rs:880 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a real display server connection (X11/Wayland) instead of surfaceless","Upgrade the EGL implementation to 1.5 for surfaceless operation"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}