raylib: vendor Mesa runtime for headless rendering - #99
Conversation
| json.dump({"file_format_version": "1.0.0", "ICD": {"library_path": "libEGL_mesa.so.0"}}, f) | ||
| os.environ["__EGL_VENDOR_LIBRARY_FILENAMES"] = vendor_json | ||
| os.environ.setdefault("LIBGL_DRIVERS_PATH", libs_dir) | ||
| os.environ["GALLIUM_DRIVER"] = "llvmpipe" |
There was a problem hiding this comment.
At first I thought we could launch using softpipe since the wheel itself would be lighter (around 18 MB compressed), but I was VERY mistaken.
openpilot test on the GitHub Actions runner ran for an hour and a half before finishing: https://github.com/commaai/openpilot/actions/runs/30970235965/job/92192765773.
With libLLVM the wheel for amd64 weighs in at around 55 MB and 5min test runtime. I also considered supporting the lightweight raylib rlsw but the performance clearly wouldn't be better than llvmpipe.
|
The macOS build is failing even on upstream, this is not related to this change: #100. The funny thing is that in my fork a cold build actually did pass the macOS build, whereas the amd64 and aarch64 builds failed: https://github.com/therepanic/comma_dependencies/actions/runs/31007471745. |
Bundle the Mesa GL stack into the wheel so headless rendering works on systems without any system GL libraries.
Regression test: commaai/openpilot#38534