Performance notes from the Wine route on an M5 Pro: where a world frame goes, and a realistic ceiling #47
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by 64bitMango on 2026-11-26T11:18:08Z.
Numbers from our Wine + D3DMetal port (same title build 1.0.2.1, Series X profile, prologue from one save) on an M5 Pro (48 GB), shared to help set expectations and priorities. Repo: https://github.com/64bitMango/VIctory-macOS.
A world frame today (release build, median of 97 samples at >3,000 draws): 308.7 ms (~3.2 fps) = preparing 121.8 + waiting on the GPU 125.2 + copying shader output back 52.8 ms, run one after another on one thread. Preparing and copy-back are the coherence work a separate-memory layer needs (write guards, shadow refreshes, copy-back); the zero-copy design in
docs/native-host.mdremoves most of that, which is the native port's big advantage.The GPU part stays. About 115-125 ms of GPU work per world frame on the M5 Pro through Apple's converter, after our shader fixes (it was ~150-158 ms). It is real work at full speed: during world frames
powermetricsshows the GPU at a median 1,323 MHz (p90 1,517 of 1,620 MHz). Real shaders ran about 1.04x native through D3DMetal, so a native path won't shrink this much by itself. Most of the cost is the title's own passes. A few heavy indirect dispatches dominated (one went from 12.4 to 3.1 ms with four-dword loads, PR #35).Realistic ceiling. With all CPU work hidden or removed, a world frame is bound by that GPU time: roughly 8-11 fps on an M5 Pro, more on Max/Ultra GPUs. For comparison, the Windows forks reach about 18-24 fps in the best world scenes on an RX 7900 XTX or RTX 5090. Their card is busy ~41 ms a frame; the title's own draws took 18.4 ms in a replay on the XTX. None reaches 30 fps in the world.
Tool that helped most. A frame recorder and replayer: record one world frame, then replay it alone with per-pass GPU times, shader variants compared turn by turn, and leave-one-pass-out costs (
docs/replay.mdin our repo). It is D3D12-specific, but the idea would carry over to a Metal backend and makes GPU work measurable without running the game.Shader changes that cut GPU time or made more programs run are in PRs #33-#37.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T13:28:24Z.
Thanks for sharing these numbers and the frame-replayer write-up, @64bitMango!
The breakdown (~115–125 ms GPU-bound on M5 Pro vs ~122 ms prepare + ~53 ms copy-back in Wine/D3DMetal) sets clear expectations: avoiding the separate-memory coherence/copy-back overhead is one of the main wins of the zero-copy native Metal host (
docs/native-host.md), and a standalone Metal frame recorder/replayer will be a very useful profiling tool once 3D world frames are running.Added the
enhancementlabel.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T15:57:01Z.
Status: kept as the reference for the performance work. Nothing to do until the story load passes the prologue (#15).
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Tarraga on 2026-11-27T16:43:54Z.
/claim
The piece I'm taking: typed buffer views made again as new Metal textures each time a record is mirrored again (about 6,000 a world frame on main), on the submitting thread under the host's lock. A cache in the Metal backend, off with a switch.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T16:44:06Z.
Claimed by @Tarraga. Open a draft pull request with
Refs #47in its description within 24 hours, or the claim expires.