feat(linux): render headless through EGL in utvio, replace OSMesa rvio_sw - #82
Merged
Merged
Conversation
…o_sw utvio needed an X display on Linux because its offscreen OpenGL context was GLX only, so render nodes had to run it under Xvfb. The software-rendering rvio_sw relied on OSMesa, which Mesa removed in 25.1. FBOVideoDevice now uses GLX when DISPLAY is set and EGL otherwise: the EGL device platform first (GPU), then Mesa's surfaceless platform (llvmpipe). UTV_GL_PLATFORM=glx|egl forces one, UTV_SOFTWARE_GL / LIBGL_ALWAYS_SOFTWARE select software rendering, and UTV_GL_DEBUG prints what was chosen. utvio_sw (also installed as rvio_sw) is now a launcher that runs utvio with EGL and software rendering forced, so existing farm scripts keep working. The OSMesa code (TwkGLFMesa, MovieRV, the rvio_sw executable) is removed. CI runs the CLI smoke and image round-trip tests a second time on Linux with no X server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Michael Oliver <mcoliver@gmail.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
utvio/rviono longer needs an X server on Linux, so it runs on render nodes and in containers withoutxvfb-run.FBOVideoDevice: GLX whenDISPLAYis set, otherwise EGL with no window system. EGL tries the device platform first (GPU), then Mesa's surfaceless platform (llvmpipe software rendering). If GLX fails with a display set, EGL is tried too.utvio_sw/rvio_sw: kept as a command for existing farm scripts. It is now a small launcher that runsutviowith EGL and software rendering forced.TwkGLFMesa,MovieRV, thervio_swexecutable). Mesa dropped OSMesa in 25.1.glfix.cmoved tosrc/bin/imgtools/rvio/.UTV_GL_PLATFORM=glx|egl,UTV_SOFTWARE_GL=1(orLIBGL_ALWAYS_SOFTWARE=1),UTV_GL_DEBUG=1to print the chosen context and renderer.cli-smokeandimage-format-roundtripa second time with no X server, and the smoke test checksutvio_swandrvio_sw.docs/headless-rendering.md, plus a README bullet.Verification
FBOVideoDevice.cppinto a test program, was compiled and run in containers with no GPU. Each case created a complete RGBA16F framebuffer and read back the float value written (4.0, 0.5):UTV_GL_PLATFORM=eglunder Xvfb selects EGL;UTV_GL_PLATFORM=glxwith no display fails with a clear error (Ubuntu).RVIO_HWconditionals).utviobuild on Linux and the EGL device (GPU) path, which needs a machine with a GPU. Linux CI covers the build and the software path.🤖 Generated with Claude Code