Build a Mesa llvmpipe with the gl_PrimitiveID fix for Ubuntu 26.04 - #2
Merged
Conversation
Resolute ships Mesa 26.0.8, which mis-reads gl_PrimitiveID in a fragment shader that also has user varyings and no geometry shader (mesa#15660), so MeshInspector picks garbage faces and crashes. The fix landed on Mesa main on 2026-07-22, seven days after the 26.2 branch point, and was never nominated for stable: it is in one branch and zero tags, so no release and no PPA carries it - kisak-mesa/resolute is 26.1.7 and still affected. llvmpipe only, against Resolute's own llvm-21-dev (the same LLVM 21.1.8 its stock llvmpipe links), built in an ubuntu:26.04 container so glibc, libdrm, libglvnd and X11 match the image that will consume it. The smoke test refuses a build that still reports the distro's Mesa version.
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.
Adds the workflow and the README section for the Mesa asset already published as
mesa-llvmpipe-77251a4-ubuntu26.Why
Ubuntu 26.04 ships Mesa 26.0.8, which mis-reads
gl_PrimitiveIDin a fragment shader that also has user varyings and no geometry shader — mesa#15660. MeshInspector's picker is exactly that shape, so on the ubuntu26 CI leg it picked a face id of-1090332440out of a 512-face mesh and crashed inMR::toTriPoint.The fix reached Mesa
mainon 2026-07-22, seven days after the 26.2 branch point, and was never nominated for stable: it is contained in one branch and zero tags, so no Mesa release and no PPA has it —kisak-mesafor resolute is 26.1.7 and still affected. There is nothing to install and nothing to wait for, hence building it.What
build-mesa-llvmpipe.yml, one job per arch, pushed-to-file trigger on any branch butmain, Mesa commit as a dispatch input:ubuntu:26.04container against Resolute's ownllvm-21-dev(1:21.1.8 — the same LLVM its stock llvmpipe links), so glibc, libdrm, libglvnd and X11 match the image that will consume it. That is also why it is cheap: no LLVM build.-Dglvnd=true, so it supplieslibGLX_mesa.so.0,libEGL_mesa.so.0,libgbm,libglapiand the DRI modules while libglvnd stays the distro's. Selection is three env vars, which keeps it opt-in and trivially reversible.glxinfo -Bunder xvfb through those env vars and fails the job if the version still reportsMesa 26.0.— a build that silently does not take effect cannot be published. Both arches reported4.6 (Compatibility Profile) Mesa 26.3.0-devel (git-77251a488e).Assets are named after the Mesa short commit, so the tag, the asset names and the README
curlpattern all agree and a future rebuild needs no renaming. I verified the published tarball round-trips: download,sha256sum -cOK, and it containslibGLX_mesa.so.0,libEGL_mesa.so,dri/swrast_dri.so,libgbm.Scope and retirement
This helps CI only. Users on llvmpipe stay affected until MeshLib takes the primitive id from somewhere else — MeshInspector/MeshLib#6774 tried and was closed, because the id it used is only valid in corner mode and desktop rendering uses vertex mode for crease-free meshes.
The README says to retire this once a Mesa >= 26.3 reaches the archive or kisak-mesa. The commit is in the tag deliberately: an image pinned by content checksum must not silently acquire a different driver — the same objection that ruled out pointing the image at a rolling PPA.
Nothing consumes it yet; wiring the ubuntu26 image is the next step.