Repository navigation
perf(gpu): alias title buffers by default under Rosetta with D3DMetal - #322
Merged
pragyaangaur merged 1 commit intoNov 26, 2026
Merged
Conversation
VICTORY_ALIAS_BUFFERS is now on unless set to 0, under Rosetta with D3DMetal only (never WARP); the start-up probe still falls back to the host copies where the remap does not work. Aliased buffers need no copy-back after a submission, which otherwise runs under HELD before the submission's bottom-of-pipe writes land. docs/macos.md gives it a section of its own, out of the table of switches that change nothing by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
For the record, since my earlier 🤖 Generated with Claude Code |
Owner
|
Thank you for the in-game run and for the honest caveats. That is the evidence I asked for, so this is merged. |
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.
Sent again after #293, as suggested there. It is now rebased on
main, and there is an in-game run on D3DMetal in #131: #131 (comment)VICTORY_ALIAS_BUFFERS(#207, from #204) is now on by default under Rosetta with D3DMetal, and never with WARP.VICTORY_ALIAS_BUFFERS=0keeps the host copies. The start-up probe still falls back to the copies wherevermach_vm_remaponto a D3DMetal buffer does not work, so those hosts behave as before.Why: with host copies, the pages that shaders wrote in a submission are copied back into title memory after the submission runs.
VirtualProtectper 64 KiB view.HELDis locked.Written,list::defer_write) land only after it.So held work on other queues that waits for those values waits for the copy-back too, and so does every queue call behind
HELD. Aliased buffers need no copy-back and no refresh, so none of this happens for them.In the game (M5 Pro, D3DMetal 4.0 beta 3; details and caveats in the #131 comment)
Changes
alias::decide_enabledtakes the switch asOption<bool>: unset is on.docs/macos.md: the switch moves out of "Optional switches", none of which changes the default, into a section of its own that documentsVICTORY_ALIAS_BUFFERS=0.VICTORY_PHYSICAL_TILES(Back XMem physical pages with CPU-visible tile heaps on Rosetta #275) has its own switch and is unchanged.Tested (on the rebased branch)
tools/macos/test-wine.sh --workspace --no-fail-fast, CrossOver 26.3's wine with Wine's own d3d12): 1098 passed, 0 failed, 25 ignored.cargo clippy --workspace --all-targets -- -D warnings, with and without--all-features, for x86_64-pc-windows-gnullvm.AI-assisted, prepared with Claude Code.
🤖 Generated with Claude Code