fix(metal,gpu): guard compute/mesh pipeline compiles, flush archive, and budget thread_pipe #243
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!243
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-243"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Sheffy007 on GitHub · 2026-11-27 03:57 UTC · original
Sheffy007:fix/compute-pipeline-deadline-and-archive-flush→main· +185 −53 · 6 files · 1 commits · merged 2026-11-27 04:26 UTCSummary
Closes three gaps where compute and mesh pipelines could block the
TITLElock for multiple seconds or lose compiled pipeline states across runs (#15, #180, #181):victory-metal):COMPILE_DEADLINEanddisk::crashed/remember_crashfrom vertex render pipelines to compute pipelines (archive::compile_compute,Metal::create_compute_pipeline*) and mesh render pipelines (archive::compile_mesh), preventing slow or crashingMTLCompilerServiceruns from holdingTITLEpast the 30 s watchdog.MTLBinaryArchivepersistence withoutDrop(victory_metal::archive):Titlelives insidestatic TITLE,Archive::dropnever runs when the process exits or is ended by the watchdog, andadded_oneonly saved when a subsequent pipeline arrived >= 5 s after the previous save.>= 200 ms(SAVE_SLOW_COMPILE) so multi-second world compute pipelines are persisted right away, and addsArchive::flush_dueat command-buffer commit so trailing additions flush onceSAVE_EVERYelapses even if no further pipelines compile.glue::thread_pipe(victory-gpu):FIRST_BIND_BUDGET+put_offtoOptions::thread_countscompute translations (Shader::threads_ready,Shader::native_threads_shader), matchingpipeandguess.Tests
archive::tests::compute_archive_hits_after_flush_across_reloaded_libraries(verifiesFailOnBinaryArchiveMisshits across separateload_librarytemp URLs afterflush_due)victory-metal,victory-gpu,victory-shader,victory-hle,victory, andxtasktest suites pass, along with Windows clippy (--all-targetsand--all-features) andcargo xtask policy.decd2ae03ctoecc323f35d@LakshanSivakumar on GitHub · 2026-11-27 04:26 UTC · original · approved these changes
Reviewed and tested together with the other open PRs on main (macOS x86_64 workspace tests, the setup shell tests, and Windows clippy). The deadline path and the thread_pipe budget match the render path. Thanks!
One thing to watch, not blocking:
added_onenow serializes the whole binary archive synchronously after every compile of 200 ms or more. On a cold first world frame with many slow compiles, that is repeated full-archive writes on the frame thread inside the title's 30 s watchdog window. If it shows up in a cold run, raisingSAVE_SLOW_COMPILEor limiting the save to once a second would cover it.