Skip to content

mesa: build the Vulkan drivers without asserts - #34

Open
brkosebay wants to merge 2 commits into
OrchardLinux:mainfrom
brkosebay:submit/mesa-ndebug
Open

brkosebay wants to merge 2 commits into
OrchardLinux:mainfrom
brkosebay:submit/mesa-ndebug

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

The Mesa package's Vulkan build used debugoptimized with asserts on, so every assert in the Imagination driver's hot paths (G5P, G9P, PCO) ran in the package users get. We read through those asserts: the ones hit in normal use are queries and invariant checks, and none carries a side effect the driver needs. -Db_ndebug=true drops them and keeps debug info and -O2. The OpenGL build already used it.

The flag covers the whole Vulkan build, so it applies to asahi (Honeykrisp) as well, as it does in Arch's own mesa package. We only checked the Imagination asserts.

Tested on the iPad 5 (j71t) in the Mesa trial package installed since 2026-12-02, together with the Mesa per-job overhead changes. Offscreen glmark2 (build, texture, terrain at 1536×2048) is within noise: GPU-bound, stock 208 vs asserts off 209. Shell start-up CPU is about 1–2 % lower. No new failures in the desktop session or in Firefox.

How to test

On a stock Orchard install, with the mesa package built from this recipe:

pacman -Qi mesa | grep Version
glmark2-es2-wayland --off-screen -b build:duration=20 -b texture:duration=20 -b terrain:duration=20
vkcube --c 600

Expected: the same scores as before (within noise), nothing new in the journal. A10 and the A12 use the same package: enabled, untested on our side.

The Vulkan build used debugoptimized with asserts on, so every assert in
the hot paths of the Imagination driver (G5P, G9P, PCO) ran in the
package users get. The production hits are queries and invariant checks;
none of them carries a side effect the driver needs, so -Db_ndebug=true
drops them and keeps the debug info and optimisation level. The OpenGL
build already used it.

Assisted-by: LLM
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