Skip to content

Build a Mesa llvmpipe with the gl_PrimitiveID fix for Ubuntu 26.04 - #2

Merged
Fedr merged 4 commits into
mainfrom
mesa-llvmpipe-77251a4
Sep 4, 2026
Merged

Build a Mesa llvmpipe with the gl_PrimitiveID fix for Ubuntu 26.04#2
Fedr merged 4 commits into
mainfrom
mesa-llvmpipe-77251a4

Conversation

@Fedr

@Fedr Fedr commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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_PrimitiveID in 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 -1090332440 out of a 512-face mesh and crashed in MR::toTriPoint.

The fix reached Mesa main on 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-mesa for 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 but main, Mesa commit as a dispatch input:

  • Built in an ubuntu:26.04 container against Resolute's own llvm-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.
  • llvmpipe only — Vulkan, video codecs and tools disabled. 25 MB installed, ~6 MB compressed, 6 min on x64 and 3 min on arm64.
  • -Dglvnd=true, so it supplies libGLX_mesa.so.0, libEGL_mesa.so.0, libgbm, libglapi and the DRI modules while libglvnd stays the distro's. Selection is three env vars, which keeps it opt-in and trivially reversible.
  • The smoke test runs glxinfo -B under xvfb through those env vars and fails the job if the version still reports Mesa 26.0. — a build that silently does not take effect cannot be published. Both arches reported 4.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 curl pattern all agree and a future rebuild needs no renaming. I verified the published tarball round-trips: download, sha256sum -c OK, and it contains libGLX_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.

Fedr added 4 commits September 4, 2026 12:11
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.
@Fedr
Fedr merged commit 4827280 into main Sep 4, 2026
2 of 4 checks passed
@Fedr
Fedr deleted the mesa-llvmpipe-77251a4 branch September 4, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant