add PLATFORM_OFFSCREEN: EGL surfaceless backend for headless CI#23
Open
adeebshihadeh wants to merge 2 commits intomasterfrom
Open
add PLATFORM_OFFSCREEN: EGL surfaceless backend for headless CI#23adeebshihadeh wants to merge 2 commits intomasterfrom
adeebshihadeh wants to merge 2 commits intomasterfrom
Conversation
Adds a new platform backend that creates an OpenGL context via EGL_MESA_platform_surfaceless, eliminating the need for X11/Xvfb in CI environments. Uses Mesa's llvmpipe for software rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
adeebshihadeh
added a commit
to commaai/openpilot
that referenced
this pull request
Feb 24, 2026
Replace Xvfb + GLFW with EGL surfaceless platform (PLATFORM_OFFSCREEN) for CI rendering. This creates an OpenGL context directly via EGL without needing any display server, using Mesa's llvmpipe for software rendering. Changes: - build.sh: build raylib with PLATFORM_OFFSCREEN when CI=1 - SConscript: link with EGL+GL in CI instead of just GL - tests.yaml: replace `source setup_xvfb.sh` with LIBGL_ALWAYS_SOFTWARE=1, add raylib rebuild step before scons - setup_dependencies.sh: remove xvfb, add libegl-dev and libgl-dev Depends on: commaai/raylib#23 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
GLAD (included via rlgl.h) embeds its own khrplatform.h that sets the __khrplatform_h_ guard but renames KHRONOS_APIENTRY to KHRONOS_GLAD_API_PTR. This prevents the system khrplatform.h from being included when EGL headers need it, leaving EGLAPIENTRYP and EGLAPIENTRY undefined, which breaks all EGL function declarations. Also remove unnecessary -DEGL_NO_X11 from PLATFORM_OFFSCREEN CFLAGS since modern Khronos eglplatform.h doesn't use it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PLATFORM_OFFSCREENplatform backend usingEGL_MESA_platform_surfacelessMotivation
Allows openpilot CI to run UI tests and generate UI reports without Xvfb. Combined with Mesa's llvmpipe, this provides full software OpenGL rendering in containers with no GPU or display server.
Test plan
make PLATFORM=PLATFORM_OFFSCREENon Linux🤖 Generated with Claude Code