macos: run from a Game Mode app bundle, set interactive QoS, and track git refs #548
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!548
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-544"
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-28 02:44 UTC · original
Sheffy007:feat/macos-game-bundle-qos-commit→main· +460 −8 · 13 files · 1 commits · openSummary
tools/macos/native-binary.sh,run-native.sh,native-setup.sh,apps/victory/src/window.rs): Stage the builtvictoryhost executable insideVictory.appbeside the release binary withLSApplicationCategoryType = public.app-category.games,LSSupportsGameMode = true, andNSHighResolutionCapable = true(removing any previous binary copy before refreshing to preserve Apple Silicon's vnode code-signing cache and ad-hoc signing the bundle), and mark theNSWindowwithNSWindowCollectionBehaviorFullScreenPrimary(1 << 7) so macOS Game Mode engages in full screen.crates/victory-platform,crates/victory-loader/src/native/run.rs): Promote both"title-main"(run_entry_with) andCreateThreadthreads (spawn_title_thread_with) toQOS_CLASS_USER_INTERACTIVE(pthread_set_qos_class_self_np) on startup.apps/victory/build.rs,apps/victory/build_git.rs,apps/victory/src/window.rs): Watch both the worktreeHEADand sharedcommondirbranch ref (or nearest existing ref directory +packed-refswhen packed) so Cargo rerunsbuild.rswhenever a commit moves the branch ref, keepingVICTORY_GIT_COMMITcurrent in theScarlettMac Native | <Series S|Series X> (<commit>)window title.Verification
cargo xtask policy/bin/bash tools/macos/tests/target-directory.sh(including newgame_mode_bundleregression) and allmacos-scriptsCI testscargo test --locked -p victory-platformcargo test --locked --target x86_64-apple-darwin -p victory --bin victorycargo test --locked --target x86_64-apple-darwin -p victory-loader --libcargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningscargo clippy --workspace --all-targets --all-features --locked --target x86_64-pc-windows-gnullvm -- -D warningsCloses #537
cc @Olima34
@Olima34 on GitHub · 2026-11-28 03:54 UTC · original · requested changes
Thanks @Sheffy007. Running from an app bundle so Game Mode can engage, and keeping the build commit current in the window title, are both useful. We read the whole diff of
733e350cwhile helping the maintainer clear the queue. Three things before it can merge:QOS_CLASS_USER_INTERACTIVEfor every title thread.spawn_title_thread_withpromotes everyCreateThreadthread, not just the main and render threads: dozens of them, with the streaming, audio and job workers among them. At the top QoS class they compete with the AppKit main thread, the pipeline-compile threads and Metal's own threads, which stay at default. It may help, or it may make frame pacing worse; the PR has no run either way. Please post a before/after world run (tools/macos/run-summary.sh --compareof two headless runs of the same length, fps per 64 frames). If it's mixed, limit the promotion totitle-mainand the thread that presents. AVICTORY_*switch to turn it off would also help testers compare.log stream --predicate 'subsystem == "com.apple.gamepolicy"'while the bundled host is full screen. Then the next tester knows what to look for.The build-script part (
build_git.rs, watching the common dir's branch ref andpacked-refs) and its tests look right, as does the script test for the bundle. CI is green on this head. No game run on our side.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.