World on an RTX 5070 Ti: where the ~0.8 s per frame go, and four open copy PRs measured against main #400
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#400
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?
@SpaghettiMaster545 on GitHub · 2026-11-24 02:56 UTC · original
The first cutscene runs at about 1 fps here before the host GPU hang (#71, #325). The diagnostics build's own lines show where the ~0.8 s of a world frame go, and four open PRs that target copies were measured against
mainon the same machine. Numbers only, from VIctory's log lines (fps, ms/frame (… preparing …)andcopies per frame: …).Setup: NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves; AMD Ryzen 7 9800X3D, 31 GB; Windows 11 10.0.26100; Rust 1.98.1. Diag build (
--profile diag --features diagnostics) of each commit, each run with its own emptyVICTORY_CACHE_DIR, the sameVICTORY_KEYS(Enter every 3 s from 8 s to 47 s; story mode opens at 24 s in every run), until the host GPU failure. "World" is every frame-rate line under 10 fps, averaged per run.maind2a4bae, three runs (ms per world frame):Per world frame the copy statistics show 33–35 k refreshes asking for 25–29 GB. Write-watch checks 20–30 GB of that (143–165 ms in watches), and 97 % of it is unchanged: about 0.7 GB per frame has actually changed. So most of a frame is the copies into and out of title memory plus the GPU's own time, and about 1,400–1,750 draws per frame wait for a pipeline that is still being built.
Four open PRs, each merged alone onto
maind2a4bae:a6deb46a2243ad6a96adbf7bfa64, run 1 / run 2main's three-run range, in both of its runs: copies 173–219 ms against 245–304, preparing 244–305 ms against 332–399, copying back 26–46 ms against 54–110.main's range on every column here (one run each), which may just mean their effect is smaller than the run-to-run spread at 1 fps.Not tested: AMD GPUs (64-lane waves); release builds; more than one or two runs per PR; the PRs combined.
AI use: Claude Code (Claude Opus 5.5) built each commit, ran the title, summarised the log lines and wrote this report; the numbers come from the runs above.
github-bot referenced this issue2026-11-26 04:55:46 +00:00
@SpaghettiMaster545 on GitHub · 2026-11-24 03:01 UTC · original
The same
maind2a4baediag build, run twice more with the cache the first run above left (pipelines and translations from its 111 s), the same keys:does not translatein every run: failed translations are tried again rather than kept, which is expected, but it means a warm run is not free of those refusals.@colehammond65 on GitHub · 2026-11-24 06:58 UTC · original
RTX 4080 performance and memory data. Median world frame time was 1671–2048 ms on baseline+#175 and 1233–2049 ms on #334+#175, so the ranges overlap. Peak working set was 10.46–12.82 GiB, peak private commit was 20.37–22.69 GiB, and minimum system commit headroom was 7.13–9.44 GiB. I did not test the copy PRs, but these runs were not commit-limited. Full report: #334
AI-assisted test report.
@qntic on GitHub · 2026-11-24 13:26 UTC · original
some amd numbers for comparison, rx 6600 xt, pcie 4.0 x8 and ryzen 5 5600x.
page faults appear to be a major bottleneck. the counters are process-wide though, so the exact source still needs to be isolated.
benchmark and diagnostics:
https://github.com/qntic/VIctory/tree/pub/memory-diagnostics
@Machad3x on GitHub · 2026-11-24 14:29 UTC · original
Measured on an RTX 3080 Ti (Windows 11, 32-lane waves; fork https://github.com/Machad3x/VIctory/tree/claude/gta6-shader-translation-crashes-705550 with #322 #230 #124 #783 #916 #776 on top of main plus many open PRs; wave64 mesh allowed by a diagnostics switch, 4-minute world runs, same keys): before these six, 'preparing' was 1500-2000 ms per frame (copies 2200-2600 ms, 670 MB, 3500 draws/frame, 0.4 fps); after: preparing 540-850 ms (copies 530-870 ms, 640-690 MB), 5300-7900 draws/frame. The copystat line still shows 8946 title copies, 21357 refreshes of 12.7 GB per 20 submissions, 3347 watch askings costing 839 ms (before: 4281 askings, 723 ms), 84.7k page faults. So #776 did not reduce the watch time here (RTX 4060 Ti also got slower in #776's own numbers); the rest of the frame (about 4 s of 4.7-6.9 s) is outside 'preparing', GPU (460 ms) and copy-back (200-330 ms).
@Mumogg on GitHub · 2026-11-24 14:30 UTC · original
A Wine data point for the CPU side, from sampled stacks rather than counters. Same card model as the opening post, on Linux.
Setup: RTX 5070 Ti, driver 615.78.08, Ryzen 5 9600X, 64 GB, Nobara 44, Wine 11.21 Staging, vkd3d-proton and DXVK
dxgi.dllfrom GE-Proton11-14. Diag build offfe310e+ #454 #177 #259 #233 #646 #578 + #334 #493 #724 #725 + the #783 region fallback + the clamp fix of #909. Mesh programs allowed on this 32-lane host (a local switch around #578's refusal),VICTORY_SHADER_LOOP_LIMIT=64, computeeeed82b877b44b5fskipped,VICTORY_NO_WATCHDOG=1.The frame, in that configuration (one run): 2,000 to 5,600 draws a frame, 73 to 156 ms on the GPU, and 1.5 to 2.4 s in
copies(watches0.7 to 1.0 s over 10 to 12 GB checked,moves0.2 to 0.4 s, about 1,200 fallbacks). So about 0.4 fps, and the GPU is idle most of it.Where the CPU is:
VICTORY_STACKSevery 3 s from 120 s to 300 s (61 dumps), symbolized against the PDB. Of the samples of title threads that were inside VIctory and not waiting (70):xmem::map<XMemMapPhysicalPages<XMemMapPhysicalPagesScatter(the title's own mapping calls)xmem::map/xmem::unmap<map_alias<queue::copy_page_mappingshost::read_partial(underShadow::copyandHostList::run_deferred)host::for_regions<Shadow::copywatch::writes(underShadow::update_freeandStaging::refresh_now)Vec::append_elements<HostList::run_deferredhost::write_mapped<copy_backblake3_hash_many_avx512WaitForSingleObject<queue::execute(waiting for the GPU)So here mapping and unmapping physical-page views is the largest single item (20 of 70), ahead of reading title memory (16) and the write-watch askings (6).
The same calls alone are cheap under this Wine, measured with small standalone programs:
GetWriteWatchwith reset over 4 GB of write-watched memory, 0 to 100,000 dirty pagesGetWriteWatchaskings of 6 MB eachVirtualProtectof a 64 KiB block of a section viewMapViewOfFile3of a 64 KiB viewUnmapViewOfFile2keeping the placeholderThe title's
watchesline is 400 to 600 µs per asking in the world, several hundred times the standalone cost. I can't say why from these numbers; the address space in the title is far larger and more fragmented than in a test program, and other threads map and fault at the same time. It does mean that on Wine the count of askings and of mappings matters more than the bytes they cover.Not tested: Windows on this machine, a profiler with kernel stacks (so no split between Wine's side and the kernel's), more than one run; 70 samples is a small number, and the dumps suspend the threads they sample.
AI-assisted (Claude Code): it ran the title, symbolized the dumps, wrote the test programs and this comment. No game data attached.
@Machad3x on GitHub · 2026-11-24 15:06 UTC · original
Follow-up on an RTX 3080 Ti (fork Machad3x/VIctory, now 7800 draws per frame in the world once 19 of 21 mesh programs translate): 'copying back' was 2894 ms per frame with only 3.6 MB copied. Two changes in Shadow::copy_back (fork commit 678496c) took it to 162-168 ms: after a page is put back the snapshot is updated to the synced bytes, so later overlapping ranges find it equal instead of reading and comparing the same 64 KiB again, and the write watch is asked at the first piece that needs a title read (still before any piece is read, so the #722 ordering holds). New diagnostics-only counters show the next cost: 'snapshots 12904 MB 2371 ms' per frame, i.e. Shadow::writing recopies the whole snapshot each time a later declared range widens the union (the world declares dozens of overlapping views of the 174 MB heap per submission). Frame time is still 6.4 to 6.7 s, 'preparing' 3.5 to 4.3 s. Working on that next.
@Machad3x on GitHub · 2026-11-24 15:14 UTC · original
Snapshot growth fixed on the fork (commit b070a23): Shadow::writing no longer recopies the whole snapshot each time a later declared range widens the union; it allocates room around the first range, records which ranges are taken and copies only the new parts (room widens geometrically). Test widening_ranges_do_not_recopy_the_snapshot (64 widening ranges: bytes copied at most 4 times the final span while the summed declared sizes are over 20 times it). RTX 3080 Ti, world run of 4 minutes: 'snapshots' went from 12904 MB / 2372 ms to 94 MB / 18.7 ms per frame window, 'copying back' stays at 14-23 ms (2894 ms before 678496c), 'preparing' 600-1345 ms (3500-4300 before). The frame still takes about 7 s, so most of it is outside the host's preparing / GPU / copy-back time (the game was on its loading-screen slideshow).
@Machad3x on GitHub · 2026-11-24 15:54 UTC · original
Big one for anyone measuring world frame time: VICTORY_D3D12_DRED=1 costs about 10x per frame in the world. Same build, same keys, RTX 3080 Ti, 4900 draws per frame: with DRED on 5800 to 7900 ms/frame (0.1 to 0.2 fps; thread stacks showed the title and its workers almost all idle in waits, so the time was in the D3D12 runtime/our per-draw markers, not in our preparing/copy-back which were 600 ms and 15 ms); with DRED off 630 to 730 ms/frame (1.4 to 1.6 fps, preparing 190 ms, GPU 410 to 500 ms). The frame number went from 1500 at 200 s to 1800 at 240 s. DRED is only needed to name a removed device's command, so leave it off for performance numbers.
@Astronaut10 on GitHub · 2026-11-24 17:57 UTC · original
Two notes from a PS5 relinker (AnyPS5) that went through the same phase:
main's range. Judging each PR on the component it targets, in ms per frame and againstmain's run-to-run spread, says more than the frame time does.AI-assisted (Claude Code); no GTA VI data.
@Mumogg on GitHub · 2026-11-24 19:08 UTC · original
Under Wine the world frame is not bound by the title process at all: it is bound by wineserver, and wineserver spends all of its time unmapping views. This is the cause I could not name in my earlier comment here (the calls costing microseconds alone and hundreds of times more inside the title).
Setup: RTX 5070 Ti (driver 615.78.08), Ryzen 5 9600X, Nobara 44 (kernel 7.3.4,
/dev/ntsyncpresent), Wine 11.22 Staging, vkd3d-proton from GE-Proton11-14. Tree:ffe310e+ #454 #177 #259 #233 #646 #578 #334 #493 #724 #725 + the #783 fallback, diagnostics build, DRED off, wave64 mesh refused (#578), about 220 draws per world frame, about 1 fps.1. Who uses the CPU (
/procuser+kernel times over a 60 s window in the world):So the title's threads are mostly waiting, and the single-threaded server is at about 85% of a core.
2. What wineserver does (
perf recordon it, user space, 40 s in the world, 17,012 samples):is_valid_view_addrreq_unmap_view3. Why (counters added in
xmem.rs, per 5 s in the world):Physical::viewsUnmapViewOfFile2)map_aliascalls / pagesThe title remaps its pool a 64 KiB page at a time, so the process ends up with about 100,000 views, and each unmap appears to make the server walk its list of the process's views (50 s of CPU over roughly 20,000 to 60,000 unmaps in the window is 1 to 2.5 ms per unmap, 10 to 25 ns per view). On Windows the kernel finds a view by address in a tree; here every other request from every thread also waits behind that walk, which is why reads, write-watch queries and waits all looked slow from inside the title.
What I tried: mapping pages that follow one another in a section as one view in
map_alias(a local switch). No effect, as the counters predict: the runs are one page long (1,010 pages in 1,010 runs), the view count stays at 92,000 to 100,000, wineserver stays at 50.2 s per 60 s, the frame at about 1,000 ms.What would help, as far as I can see: fewer live views (merging neighbours that show consecutive pages back into one view, which costs unmaps of its own), or fewer unmaps, or a view lookup in wineserver that is not linear. The last one is Wine's to fix. Edit: I have now read
server/mapping.c(upstream 11.21; Staging may differ): a process's views are a linked list,find_mapped_view(unmap) searches it linearly, andis_valid_view_addr, called for every new view, walks the whole list to check for overlap. So both a map and an unmap cost a pass over all ~100,000 views. AMD and Proton users should see the same thing, since it does not depend on the GPU; atopduring the world showing wineserver near 100% of a core would confirm it.(AI-assisted, Claude Code: it ran the profile, added the counters and wrote this; runs on my machine.)
Edit: the Wine version was 11.22 Staging, not 11.21 (the system had updated before these runs).
@Daniel333313131 on GitHub · 2026-11-24 19:40 UTC · original
The same measurement on AMD (64-lane waves), which the report above lists as not tested. Same CPU as above, so the GPU is the main difference.
Setup: AMD Radeon RX 7900 XTX 24 GB, driver 32.0.32029.2010, 64-lane waves; AMD Ryzen 7 9800X3D, 32 GB; Windows 11 10.0.26300; Rust 1.98.1. Diag build (
--profile diag --features diagnostics) ofmainffe310e, each run with its own emptyVICTORY_CACHE_DIR,VICTORY_D3D12_DRED=1, the sameVICTORY_KEYSas above (Enter every 3 s from 8 s to 47 s), until the host GPU failure. "World" is every frame-rate line under 10 fps, averaged per run. The data folder (saves) was shared between runs.mainffe310e, three runs (ms per world frame):Per world frame the copy statistics show 9.3–11.0 k refreshes asking for 7.4–8.5 GB; write-watch checks 7.6–9.3 GB (86–140 ms in watches), 97 % of it unchanged.
The failures: all three runs end in a GPU page fault rather than a plain hang, two of them inside freed textures (DRED):
page fault at 0x4273d0000; inside freed ["texture 2048x2048 f98 flags 0x0 (type 34)", "texture 2048x2048 f98 flags 0x0 (type 34)"]page fault at 0x46c33b000(between two title memory copies, no freed resource named)page fault at 0x473cd9000; inside freed ["texture 2048x1024 f98 flags 0x0 (type 34)"]That may be related to #507 (the same GPU).
Not tested: release builds; open PRs; more than three runs.
AI use: Claude Code (Claude Opus 5.5) built the commit, ran the title, summarised the log lines and wrote this comment; the numbers come from the runs above.
@aycow on GitHub · 2026-11-24 21:29 UTC · original
I profiled the existing unwatched texture refresh using generated RGBA8 tiles. At 4K, the median was 5.61 ms for an unchanged refresh, 5.60 ms in BLAKE3 alone and 0.057 ms for the mapping query. A full exact compare took 1.59 ms and required a separate 31.9 MiB copy, so the fixture does not establish a memory tradeoff for the world workload.
If you're collecting another matched authorized run, the test branch adds a diagnostic line with VICTORY_TEXTURE_HASH_TIMING=1. Aggregate texture_hash_ms, texture_hashed_mb, texture_hash_changed_mb, and the overall texture preparation time from the same warm window would show whether FIND-2 dominates. Please keep other copy controls at their normal settings and share only aggregate figures.
AI-assisted using Codex.
@marquezinii on GitHub · 2026-11-24 21:48 UTC · original
For comparing the copy PRs without the title: #1743 adds an ignored benchmark. It replays a world frame's refreshes, snapshots and copy-back on a made-up 174 MB heap shaped like the numbers in this issue, and checks that copy-back keeps both the GPU's and the title's bytes.
I ran 15 open copy PRs through it, each merged alone onto
ffe310e, on an RTX 5070 host. Full table in #1743. In short:main's spread.main.main's spread.These numbers are synthetic and measure wall time of the copy path only. They say nothing about fps in the title.
@Marvisak on GitHub · 2026-11-25 01:48 UTC · original · edited 2026-11-25 21:44 UTC
Automated triage for the maintainers.
This issue stays where the world frame-time breakdown is tracked. Earlier runs on
940d32fshowed the marked-page copy-back working in the world; the world is still at about 0.5–2 fps.New since the last triage, all on
main13f91caunless noted:VirtualProtectcalls and 940 write faults per frame, with the guard lock incrates/victory-gpu/src/watch.rsheld about 600 ms per frame. Two local experiments (parallel refreshes, leaving hot pages unguarded) made it worse. This run used four open PRs (#2460, #2461, #2462, #2464) on top ofmain.VICTORY_SHADER_LOOP_LIMIT=4096and a local patch moving the page table into video memory changed nothing.VICTORY_COPIES_IN_VIDEO_MEMORY=1drops the menus to 2 fps on this card because the CPU reads write-combined memory.main, so it is a comparison point only.Open pull requests aimed at the CPU side are unchanged: #2136, #2147, #2377 and #1818 (copy and refresh paths) and #2134 (a benchmark of a world frame's preparing); none is merged yet. Still open from before: the 6 GPU writes reported lost through the unarmed-page shortcut in
copy_back_marked(crates/victory-gpu) for a maintainer to check. The device removal that ends some of these runs is tracked in #71.Generated by Claude Code
@0xkn0wh3r3 on GitHub · 2026-11-25 03:12 UTC · original
Synthetic re-measurement on current
main(940d32f): with marked pages, snapshots and copy-back nearly vanish; refresh is what is leftNo title run. This uses #1743's world-frame copy benchmark (174 MB heap, 36 submissions per frame, 24 declared ranges each, about 24 GB of refresh asked per frame), adapted to
main. RTX 5070 Ti, driver 621.24, release build, 5 counted frames.writing(.., false), what #1743 measures)writing(.., true), the path tracked memory takes sincecd94d35/940d32f)For the marked run the benchmark refreshes each declared range before arming it, as
Host::executedoes, sets each GPU write's page bit (Shadow::mark_entry) and copies back throughcopy_back_marks.watch.rsexplains that finer units cost more than they saved on the world's buffers.Shadow::writing(the snapshot copies), 25% in copy-back's compare and 10% in refresh, withReadProcessMemoryat 7% (#1010 removes that system call).copy_back_marked: the title wrote next to them on a page only partly inside a declared range.This is a synthetic pattern of the copy path's wall time. It says nothing about fps in the title or the GPU's own time. A title run with the same method would show whether the world's tracked heaps take the marked path as this does.
@Feuris on GitHub · 2026-11-25 03:54 UTC · original
RX 6700 XT (RDNA2, 64-lane waves): a title run on current
main940d32f— tracked heaps do take the marked-page path, but refresh, GPU time and pipeline stalls still leave the world at 0.6–2 fpsThis is the title run the maintainer triage asked for in #400 and #400: a real world run on current
main, DRED off, to see whether the world's tracked heaps take the marked path and how much is left. It fills the RDNA2 gap between the RX 6600 XT and RX 7900 XTX data points.Setup: AMD Radeon RX 6700 XT 12 GB, driver
32.0.21045.16010, 64-lane waves; AMD Ryzen 9 7900X; Windows 1010.0.26200; Rust 1.98.1. Title7952987A, buildb99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93, Xbox Series X profile. Diag build (cargo build --profile diag -p victory --features diagnostics) ofmain940d32f. DRED, WARP, GPU_TIMING and SHADER_LOOP_LIMIT all unset;VICTORY_LOG=info; sameVICTORY_KEYSas the report (Enter every 3 s from 8 s to 47 s). Warm cache, not cold:%LOCALAPPDATA%\victory\cachehad 25,985 shader files (1.35 GB), 3 pipeline files (4.2 MB) and 5 images (117 MB); an earlier 85 s run had already warmed it. So this is comparable to the "warm" runs in the thread, not to the empty-cache runs in the opening post.Method: one 180 s run, stopped by a title crash at 2 m 39 s (VIctory frame ~1439). "World" is every frame-rate line under 10 fps, as in the report; the first two such lines are still transition frames (3 and 12 draws), so the early average includes them. Split by time into the first 9 and the last 9 world lines.
Menus stayed at ~28–30 fps throughout, so the slowdown is world-only. The frame did not settle: it went from ~1.2 fps in the first real world frames to 0.3–0.6 fps by the end.
A representative late
copies per frameline (VIctory frame ~1437, 03:42:20 UTC):There were also four
slow host submissionwarnings: 252 ms, 481 ms and 1175 ms in this run (the last immediately before the crash), each with roughly 30–40 compute pipelines; 15 shaders logdoes not translateand one host mesh pipeline is refused with0x80070057. Those explain the black frames and missing geometry, not the frame time.What this adds
cd94d35/940d32f. The synthetic comment's conclusion holds in the title.VICTORY_D3D12_DRED=1; this run has DRED off per #400, so the components are more comparable than the total frame times.Failures in the three copy configurations I tried
0xC0000005read of0x0atvictory-image-b99f876b74d4a77f.dll+0x469627at 2 m 39 s.crashcontext.log: Game Physical 2182/2306 MB,Unused: 0/590 MB, Pool 592/625 MB, TileHeap 3968/6236 MB; host working set 22.8 GB. Looks like memory pressure, no device removed.VICTORY_COPY_MODE=nonehost GPU device removed0x887A0006after 12 lists at 48 s, preceded byunordered buffer view empty or past its host copy. Diagnostic-only: stale data, not a playable config.VICTORY_COPY_MODE=plain0xC0000005inVCRUNTIME140.dll+0x1de4e, reading reserved-never-committed memory, afterdstorage: a destination's physical pages could not be writtenwarnings, at 31 s. Diagnostic-only.So neither alternate copy mode is a valid measurement; the guarded default is the only one that produces a comparable world run here.
Questions
victory-image+0x469627map to a known title-side allocation failure under the memory pressure shown in the crash context?I can attach the two
crashcontext.logfiles and the two minidumps on request; no game data is included here.AI use: OpenCode (Big Pickle) built the binary, ran the title, parsed the logs with a small PowerShell script and wrote this report. All numbers come from the run logs and crash files listed above.
Local logs used (not for attachment unless asked):
%TEMP%\victory-diag-5min.log/victory-diag-5min.err.log(guarded run)%TEMP%\victory-diag-none.err.log%TEMP%\victory-diag-plain.err.log%LOCALAPPDATA%\victory\data\7952987A\crashes.log%LOCALAPPDATA%\victory\data\7952987A\temp\victory-20261125-004222-34556.crash.logand...25864.crash.log@r4tedx on GitHub · 2026-11-25 05:18 UTC · original
A request for the "on the GPU" share (174–308 ms per frame in @Feuris's run on
940d32f): which commands hold it?No open PR reduces the GPU time of the translated shaders themselves, and I am working on that. Before removing anything I counted what the translator writes (#2115 adds the count to the CLI): on
main940d32f, 190,954,569 host instructions in 25,591 emitted programs, 4.7 for each console instruction. 27 % of them are bitcasts, which a driver's compiler drops. The code added per buffer store (write marks) sits at about 14,000 store sites in all. So a static count does not say where the GPU time goes, and I would rather not guess.Two runs on current
mainwould tell, from anyone who has the world running (a 64-lane card shows the lighting passes too):VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1(diagnostics build), a few world frames. The log then hasslow host listlines, each followed byslow list command, <ms> ms: <op>for its six slowest commands. Useful to post: how many slow lists per frame, and for the slow commands the kind (draw, dispatch, indirect execution, its clamp dispatch, copy) with the milliseconds. No shader names are needed. If the same few pipelines repeat, saying "the same N pipelines" is enough.VICTORY_SHADER_LOOP_LIMIT=4096against the default, same scene, with a warm shader cache for each (the limit has its own cache entries). Useful to post: "on the GPU" per world frame for both. The README says that if a lower limit makes world frames much faster, loops running into the limit are the cost. That would outrank anything that can be removed from the code.Why these two: the candidates are (a) a few programs whose loops run to the iteration limit, (b) the roughly 1,500 clamp dispatches per frame that go before each indirect execution, each with barriers and a pipeline rebind (
indirect.rs), and (c) the code the translation adds to every access (table loads, clamps, marks). They need different fixes, and only (c) shows in an instruction count.What I measured here: offline counts over
shaders.rpf(local title data, CPU only, counts only), and a synthetic benchmark with GPU timestamps on WARP, which does not predict a graphics card. The title was not run.AI-assisted
@r4tedx on GitHub · 2026-11-25 06:10 UTC · original
Preparing time: a synthetic replay of the published volumes, two small fixes, and a request for one log line
@Feuris's run above put 774–1,198 ms of the world frame into preparing and published the volumes behind it. I replayed those volumes without the title to see where that time can go, and have two changes that need a title run to confirm.
What I ran (synthetic, software adapter only). #2134 adds an ignored benchmark that runs a made-up world frame through
Host::executeitself: 4,100 host copies of 1.6 GB, 33 submissions, 22,494 refreshes asking for 21 GB, 274,094 change checks, 7,813 protect calls, 580 MB of snapshots. Onmain940d32f(Ryzen 7 7800X3D, WARP,diagprofile withdiagnostics):GPU writesstep (563 ms in the title run) is, here, almost all the refresh batch that a root UAV's declaration flushes, plus the snapshots. Arming a declared range costs 31–36 µs when it runs to the end of a 174 MB copy.The two fixes.
Both together, on
940d32f, with no other change: branchtesters/preparing-skip-armofr4tedx/VIctory(e11280e).The request. If you measure the world on
main, could you run that branch the same way (cargo build --profile diag -p victory --features diagnostics,VICTORY_LOG=info) and post, for a late world frame of each build:copies per frame:line, unshortened, and theguard lock held per frame:line under it.The fields that decide it:
refreshes … skipped(the copies left out),watches … MB checked, the stepsGPU writesandtitle memory, andpreparing. From themainline alone, the fields nobody has posted yet would already say where the rest of the time is:guard faults,pages opened,tracked pages written (… the frame before too),page faults … preparing, … copying back,protecting … ms,moves … ms.Not run: the title; any hardware GPU. Everything above is the software adapter and a made-up pattern, so it says which change moves which part, not what frame rate the title gets. The title was not used in these tests.
AI-assisted
@lhnizdo on GitHub · 2026-11-25 20:49 UTC · original
Measurements from an RTX 2080 (32-lane waves), Windows 10 19045, Ryzen 7 2700X (16 threads), on
main13f91caplus #2460 #2461 #2462 #2464, which upstream needs on this machine. Diag build, warm shader cache, 12-minute runs from launch through the opening cutscene,VICTORY_SKIP_PIPELINES=f607780aa8e502d0. CPU and GPU utilisation were sampled every 5 s; the busiest GPU engine here isgraphics_1.Where a frame goes on
main(warm, per frame, averaged over the run):From the copy statistics in the heavy part of the cutscene:
VirtualProtect: 3,790 calls a frame for 4,158 pages, 306 ms (about 80 µs a call).watch.rs:709(writing) 174 ms,:493(taken) 167 ms,:451(take_split) 142 ms,:810(the fault handler) 111 ms.So on this machine copying itself is no longer the bottleneck. The tracking around it is: protection changes, faults, and the guard lock. Threads mostly wait, which is why CPU and GPU utilisation both stay low.
Two things I tried that didn't help (measured the same way):
flushgrouped by copy, up to 8 threads): 2,338 frames instead of 3,070, frame 2,319 ms instead of 1,977, CPU 37% instead of 18%. Spreading the copies just made the threads contend for the guard lock.protect_notingfor 60 frames, kept changed in its trackers): protect calls fell from about 3,800 to 1,400–2,200 and faults from about 930 to about 210. But refresh batches went from 204 ms to 1,501 ms a frame, since always-changed pages are copied at every take. Lock waiting rose from 41 to 167 ms. The device also hung about 5 min in, which the same build without it didn't do in 12 min.Moving the
VirtualProtectcalls out of the guard lock looks unsafe as it stands: the fault handler relies on the protection andprotectedchanging together under the lock. Taken together, this looks like more support for the direction of #407 / #880 (game memory the GPU reads in place, or one address space) than for tuning the tracking further.AI-assisted (Claude Code); the runs were on my machine. No game data.
@tumbubu on GitHub · 2026-11-25 21:16 UTC · original
RX 7900 XT (RDNA3, 64-lane waves), in the world on
main13f91ca: GPU commands are about 180 ms of a 900 ms frame. Three GPU-side hypotheses tested here, none of them moves it.This answers both of @r4tedx's requests above on a 64-lane card, and adds two placement tests.
--profile diag --features diagnostics) of13f91ca, cache warmed withtranslate --cache --pipelines.VICTORY_LOG=info, Enter every 3 s from 8 s to 47 s, 180 s each.GPU timingreports with more than 50 ms of commands per frame.mainVICTORY_SHADER_LOOP_LIMIT=4096The draws per frame differ between runs, so the fps column is within run-to-run spread. The GPU column is the one to compare.
1. Which commands hold the GPU time (
VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1): lists 215 ms/frame of wall time, commands 183 ms/frame.[compute caa78b8ca62bc3d6][compute 28918b7150a7aad5][compute 39f0e9aeb156a61c][compute f22a76fcb967ee59][compute 660814153af43185][mesh 910b4be059bfb28f, pixel bff8660bf8e29c26]1x1x1dispatches of both take up to 25–27 ms (mean about 8 ms over 22 of them), and a7103x1x1one of28918b7150a7aad5takes 26.9 ms.2. Loop limit 4096 against the default: no change. Commands are 181.5 ms/frame.
caa78b8ca62bc3d6takes 23.6 ms and28918b7150a7aad520.6 ms, and the1x1x1dispatches still take up to 39 ms. So loops running into the limit are not what makes them slow here.3.
VICTORY_COPIES_IN_VIDEO_MEMORY=1: it cannot measure the world on this card. With the copies in a GPU upload heap, the menus drop from 30 to 2.1 fps, and copying back costs about 333 ms per frame for 0 MB written back, because the CPU reads write-combined memory. Within 180 s the run never left the menus. Someone measuring this should expect the same on AMD with resizable BAR.4. Page tables in video memory: a local diagnostics-only patch, not a PR.
Shared::new's title memory page table moves from the upload heap to a GPU upload heap, which the CPU only writes. The reasoning: every title-memory access reads it twice, dependently, across the bus. Result: commands 180.4 ms/frame,28918b7150a7aad522.2 ms andcaa78b8ca62bc3d619.0 ms, so no change. The same patch with the page bitmaps moved as well stalls in the menus, for the same reason as item 3.What this leaves:
AI-assisted (Claude Code); every run was on this machine. Only timings and pipeline hashes from VIctory's own log lines are posted, no game files.
@HLVM04 on GitHub · 2026-11-25 21:27 UTC · original
A 32-lane counterpart to the 64-lane split above, for request 1 of r4tedx's comment. It is not upstream
main: it is fxceless/victory-fork at9376fd6, Series X profile, RTX 5070 Ti (driver 616.64), Ryzen 7 9800X3D,VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1, one run in the world, per world frame.5cf00dc39042edaf7.2 ms,14264103296aa43a5.7 ms,0a5ecfee6b79e13b3.0 ms. Heaviest indirect mesh:ef5409053e14aa82/94d281151ca58b4f, 6.3 ms in 197 commands.SHADER_LOOP_LIMITcomparison was run on this tree.@Venom2054 on GitHub · 2026-11-26 08:16 UTC · original
Following #3028, I measured the loaded prison-window scene on Windows 11 / RTX 5070 Ti, Series S profile,
Zayfway/victory-fork@3e760ed. With a stationary camera andVICTORY_CARD_METER_PIPELINES=1, the span for the scalarized projected-decal reduction (1f1fbd86759b3da2) grew from 1.54 to 4.91, 9.00, and 11.33 ms per frame in 256-frame windows ending 199, 223, 249, and 274 seconds after world entry. Binding frequency stayed around 0.7–0.8 per frame.In a separate run at the same camera, I sampled the 12 bytes of the actual clamped D3D12
ExecuteIndirectargument once per 64 presents and read back after submission completed. In the +179–204 s window the observed dispatch X counts were 11, 0, 0. At +258–285 s they were 100, 105, 87, 90. Y and Z were always 1, with 64 threads per group and no optional count buffer. The preceding classifier's direct 160×90 dispatch is a different command.The later workload is genuinely larger in these samples. Between the last two windows in the repeat, however, the sample median changed only from 93 to 95 groups while time per binding rose from 7.93 to 12.59 ms. These timestamps extend to the next pipeline binding and can include surrounding preparation. They do not isolate the reducer's execution time. Elapsed world time and actual indirect dimensions seem worth recording when comparing captures from this scene.
@RobertAndreiGit on GitHub · 2026-11-26 13:31 UTC · original
Another NVIDIA data point on copy preparation after world entry. Downstream
cool_fox(f4b48ad766ddbase, local host-temporal4d8e5728a3df), RTX 3060 Ti 8 GB / NVIDIA 615.78.08 / Ryzen 5 5600, CachyOS Proton, vkd3d-proton 3.2.0. Series S, same save, 1080p output. The host upscaler was active in both rows.These are medians of individual counters over the first 15 intervals with 3,000–6,000 draws and ≤15 pipelines pending. Copies are included in preparation. The counters are not an additive frame budget, and the scene was not deterministic. We still saw 292 dropped draws/frame in the second run; it has no visual sign-off.
Other controls that may help narrow this down:
A useful follow-up on upstream would be to split the copy-preparation timer between finding dirty ranges, copying host bytes and waiting, with submitted bytes and dropped draws next to it. We haven't established which part can be removed safely.
@potatoe0100 on GitHub · 2026-11-26 14:11 UTC · original
For anyone comparing numbers here: #2147 (
781e846) and #2377 (106377d) have since merged, after13f91ca. The13f91cameasurements in this thread don't include them; currentmain(63bcca4) does.AI-assisted (Claude)
@zed6000 on GitHub · 2026-11-26 16:30 UTC · original
An AMD data point: RX 7900 XTX,
mainagainst the #1247 shader stack, intro cutscene.Setup: AMD Radeon RX 7900 XTX 24 GB (RDNA3, 32- and 64-lane waves), driver 32.0.32029.2010; Ryzen 9 7900X3D, 95 GB; Windows 11 10.0.26200; Rust 1.98.1, release builds. Series X profile, played by hand from boot into the intro cutscene. Both runs had pre-built pipeline caches, and every shader came from the cache (0 translated during the run). Not deterministic: the scenes differ a little between runs. "Busy" means every frame-rate line under 10 fps; the figures are medians of those lines.
main63bcca4main+ #1924 port, #2978, #385, #2999, #1737, #3016, #2363, #1738, and the #2930 states)main: 8 shaders do not translate in the intro: 1 pixel shader and 7 compute shaders. The reasons:v_cvt_f32_f64(3), a lane mask read as data (2), barycentrics read directly (1), a descriptor read only as data (1),v_permlanex16_b32(1). Visible result: parts of the intro missing or drawn over, characters badly broken, terrain not shown.@zed6000 on GitHub · 2026-11-26 17:44 UTC · original
Five open copy PRs measured on AMD: none changes the intro's frame time here. A follow-up to my RX 7900 XTX report above.
Setup: RX 7900 XTX 24 GB (RDNA3), driver 32.0.32029.2010, Ryzen 9 7900X3D, 95 GB, Windows 11 26200, Rust 1.98.1. Base:
main63bcca4+ the #1247 shader stack + #2703, which together leave 0 dropped draws in this scene. Each PR was merged onto that base (all clean) and built as a diag build. Series X profile,VICTORY_KEYSEnter every 3 s from 8 s to 29 s, warm shader, pipeline and driver caches. Each run is closed after 36 frame-rate lines under 10 fps (about 3 minutes of the intro cutscene). Medians of those 36 lines, ms per frame:VICTORY_CARD_COPIES=1VICTORY_VRAM_COPIES=1--console series-sVICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1on the base): lists take 160 ms/frame of wall time, of which their commands take 139 ms. That time is spread thinly. The heaviest pipeline is 8.5 ms/frame (191 indirect mesh draws). The top 25 pipelines add up to 61 ms: indirect 46 ms (2,071 commands), dispatch 13 ms, mesh 3 ms.