Repository navigation
metal: compiles off the UI thread (timeout + budget), per-user shader cache, warm-cache step - #396
Merged
Merged
Conversation
…budget in PanVK, one shader cache per user, a warm-cache step Every Settings open compiled the same 24522-NIR compute shader (25 s on one core, GPU idle, UI stalled) and a Preferences fragment shader never ended. - frontend-async-compile.diff: compiles run on a worker; the synchronous creation calls wait STARBITE_M2V_COMPILE_TIMEOUT_MS (5000) and fail like a refused pipeline while the compile goes on; the completion-handler calls return at once; slow failures are not retried for 10 min - mesa26-panvk-compile-budget.patch: STARBITE_PANVK_COMPILE_BUDGET_MS (90000) abandons a runaway compile (register-allocator rounds check a deadline, longjmp out) - hotmetal2-shared-cache.diff: /var/local/m2v-cache/u<uid>, one directory for all of a user's processes - steps.d/81-m2v-cache.sh + harvest-m2v-cache.sh: the directory, and a warm cache harvested from a phone - docs/ios27/METAL.md: causes; format 500 is YCBCR8_420_2P
Collaborator
Author
|
Phone 2 test (19 Nov, L6 kernel = xnu c1a4a666e + #65): not merging. The bundle from this branch (StarbiteMetal e0992bce, libvulkan_panfrost 9c579b12) was installed with
Suggestions: keep the synchronous |
claudiusthebot
added a commit
that referenced
this pull request
Nov 19, 2026
…)" (#397) Phone 2 test on 19 Nov showed this bundle is not usable: with the default 5 s compile cap backboardd crash-loops on a cold cache, and with the cap off no frame is ever presented. It was merged by mistake after that result.
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.
Settings froze and its first opens were slow on the iOS 27 S9 port (Mali-G72, PanVK + metal2vulkan).
Causes (phone 2 log con-xnu-boot-L4-1118-2103): PanVK compiled on the thread that asked for the pipeline (the completion-handler calls also compiled on the caller), so a 24 522-NIR compute shader took 25 s on one core and stalled the UI; a Preferences fragment shader (3 023 NIR) never ended in Bifrost's spill/RA loop; and the shader cache was one directory per program, so only backboardd's was ever written.
Changes
mk-bundle27.sh / mk-panvk27.sh apply the new patches. Built on the mini: bundle StarbiteMetal e0992bce.., libvulkan_panfrost 9c579b12... Not yet phone-tested. Local checks: arch-check, builds-test, build-lock-test pass.