Skip to content

GLES backend: EGL surface creation fails on older Mesa (Linux) #330

Description

@guillaug

Problem

The GLES backend (--cfg gles) fails on Linux with older Mesa drivers (tested: 21.2.6 / Intel UHD) with BadNativeWindow or BadAlloc.

Three issues compound:

  1. Surfaceless platform preferred over windowedEGL_MESA_platform_surfaceless is selected before native X11/Wayland platforms. Surfaceless cannot
    create window surfaces.

  2. XCB window ID passed as pointer — The Rwh::Xcb branch passes &mut temp_xcb_handle (pointer to u32) but eglCreateWindowSurface expects the raw
    XID as NativeWindowType.

  3. EGL_SINGLE_BUFFER rejected — Some Mesa drivers reject EGL_SINGLE_BUFFER with BadAlloc on window surfaces. The code already documents this
    risk.

Environment

  • Mesa 21.2.6 (Debian Bullseye)
  • Intel UHD Graphics (CometLake-U GT2)
  • EGL 1.5, Vulkan 1.2 only
  • Wayland session with XWayland

This issue was investigated and diagnosed with Claude Code (Opus 4.6).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions