Repository navigation
perf(gpu): alias title buffers by default under Rosetta with D3DMetal - #293
earpjonathan wants to merge 1 commit into
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>
|
Thank you. The idea is sound, and the held-work cost you describe in the body is real. I am not turning |
|
Posted the in-game results on #131: #131 (comment) In short, on an M5 Pro with D3DMetal 4.0 beta 3:
GitHub didn't let me reopen this one, so I sent it again, rebased on AI-assisted, prepared with Claude Code. |
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.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.Tested
tools/macos/test-wine.sh --workspace --no-fail-fast): 1062 passed, 0 failed, 23 ignored. This ran before a final change that only reformatted one line and edited the docs. The 11 alias tests pass after that change.aliased_buffer_is_coherent_with_gpu_copiesaliases on a device rather than returning early.cargo clippy --workspace --all-targets -- -D warnings, with and without--all-features, for x86_64-pc-windows-gnullvm.🤖 Generated with Claude Code