World on an RTX 5070 Ti: where the ~0.8 s per frame go, and four open copy PRs measured against main #400

Open
opened 2026-11-26 04:02:31 +00:00 by github-bot · 26 comments
Owner

@⁠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 main on the same machine. Numbers only, from VIctory's log lines (fps, ms/frame (… preparing …) and copies 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 empty VICTORY_CACHE_DIR, the same VICTORY_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.

main d2a4bae, three runs (ms per world frame):

run frame preparing (copies) textures on the GPU copying back draws/frame dropped without a pipeline / indirect device removed
1 845 399 (304 ms, 186 MB) 21 216 110 1925 1437 / 1949 111 s
2 815 367 (288 ms, 221 MB) 19 322 74 1830 1394 / 1697 100 s
3 775 332 (245 ms, 142 MB) 29 281 54 1625 1750 / 1704 59 s

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 main d2a4bae:

PR frame preparing (copies) on the GPU copying back device removed
#124 a6deb46 742 360 (282 ms) 212 93 115 s
#261 a2243ad 765 352 (281 ms) 261 66 154 s
#230 6a96adb 715 355 (282 ms) 259 64 141 s
#322 f7bfa64, run 1 / run 2 867 / 742 305 (219 ms) / 244 (173 ms) 179 / 287 46 / 26 65 s / 89 s
  • Only #322 moves a component outside main'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.
  • #124, #261 and #230 stay within 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.
  • None of them changes the hang. The time of the device removal varies from 59 to 154 s across all runs, so the PRs' times say nothing either way.
  • The whole frame does not get clearly shorter with any of them, because GPU time (179–322 ms) and the draws waiting for pipelines stay.

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.

**@⁠SpaghettiMaster545** on GitHub · 2026-11-24 02:56 UTC · [original](https://github.com/Marvisak/VIctory/issues/400) 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 `main` on the same machine. Numbers only, from VIctory's log lines (`fps, ms/frame (… preparing …)` and `copies 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 empty `VICTORY_CACHE_DIR`, the same `VICTORY_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. **`main` `d2a4bae`, three runs** (ms per world frame): | run | frame | preparing (copies) | textures | on the GPU | copying back | draws/frame | dropped without a pipeline / indirect | device removed | |---|---|---|---|---|---|---|---|---| | 1 | 845 | 399 (304 ms, 186 MB) | 21 | 216 | 110 | 1925 | 1437 / 1949 | 111 s | | 2 | 815 | 367 (288 ms, 221 MB) | 19 | 322 | 74 | 1830 | 1394 / 1697 | 100 s | | 3 | 775 | 332 (245 ms, 142 MB) | 29 | 281 | 54 | 1625 | 1750 / 1704 | 59 s | 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 `main` `d2a4bae`:** | PR | frame | preparing (copies) | on the GPU | copying back | device removed | |---|---|---|---|---|---| | #124 `a6deb46` | 742 | 360 (282 ms) | 212 | 93 | 115 s | | #261 `a2243ad` | 765 | 352 (281 ms) | 261 | 66 | 154 s | | #230 `6a96adb` | 715 | 355 (282 ms) | 259 | 64 | 141 s | | #322 `f7bfa64`, run 1 / run 2 | 867 / 742 | 305 (219 ms) / 244 (173 ms) | 179 / 287 | 46 / 26 | 65 s / 89 s | - Only #322 moves a component outside `main`'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. - #124, #261 and #230 stay within `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. - None of them changes the hang. The time of the device removal varies from 59 to 154 s across all runs, so the PRs' times say nothing either way. - The whole frame does not get clearly shorter with any of them, because GPU time (179–322 ms) and the draws waiting for pipelines stay. **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 locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:02:32 +00:00
Author
Owner

@⁠SpaghettiMaster545 on GitHub · 2026-11-24 03:01 UTC · original

The same main d2a4bae diag build, run twice more with the cache the first run above left (pipelines and translations from its 111 s), the same keys:

run world fps (avg) frame preparing (copies) on the GPU copying back draws/frame dropped without a pipeline / indirect device removed
warm 1 2.9 682 301 (221 ms) 290 70 1683 791 / 1112 70 s
warm 2 1.5 813 349 (271 ms) 381 64 2586 1041 / 1416 97 s
  • With the cache, the draws dropped for a pipeline still being made fall from 1,394–1,750 to 791–1,041 per frame, and world frames are a bit shorter. The rest of the frame (copies, GPU time) and the hang are as before.
  • About 370 shaders still log does not translate in 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.
  • So on this card a second launch is only a little smoother in the world. The hang (#71) is what ends it, cold or warm.
**@⁠SpaghettiMaster545** on GitHub · 2026-11-24 03:01 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7120692228) The same `main` `d2a4bae` diag build, run twice more with the cache the first run above left (pipelines and translations from its 111 s), the same keys: | run | world fps (avg) | frame | preparing (copies) | on the GPU | copying back | draws/frame | dropped without a pipeline / indirect | device removed | |---|---|---|---|---|---|---|---|---| | warm 1 | 2.9 | 682 | 301 (221 ms) | 290 | 70 | 1683 | 791 / 1112 | 70 s | | warm 2 | 1.5 | 813 | 349 (271 ms) | 381 | 64 | 2586 | 1041 / 1416 | 97 s | - With the cache, the draws dropped for a pipeline still being made fall from 1,394–1,750 to 791–1,041 per frame, and world frames are a bit shorter. The rest of the frame (copies, GPU time) and the hang are as before. - About 370 shaders still log `does not translate` in 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. - So on this card a second launch is only a little smoother in the world. The hang (#71) is what ends it, cold or warm.
Author
Owner

@⁠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.

**@⁠colehammond65** on GitHub · 2026-11-24 06:58 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7124485000) **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: https://git.gtahub.st/github/Marvisak--VIctory/pulls/334 AI-assisted test report.
Author
Owner

@⁠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.

  • ReadProcessMemory: ~3.4 gb/s after the first memory touch
  • actual runtime copies: ~280 mb/s
  • 400k to 1.27m page faults per frame
  • gpu reads from host heap: ~13 gb/s
  • gpu reads from vram: ~71 gb/s

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

**@⁠qntic** on GitHub · 2026-11-24 13:26 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7132844974) some amd numbers for comparison, rx 6600 xt, pcie 4.0 x8 and ryzen 5 5600x. - ReadProcessMemory: ~3.4 gb/s after the first memory touch - actual runtime copies: ~280 mb/s - 400k to 1.27m page faults per frame - gpu reads from host heap: ~13 gb/s - gpu reads from vram: ~71 gb/s 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
Author
Owner

@⁠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).

**@⁠Machad3x** on GitHub · 2026-11-24 14:29 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7134456091) 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).
Author
Owner

@⁠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.dll from GE-Proton11-14. Diag build of ffe310e + #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, compute eeed82b877b44b5f skipped, 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 (watches 0.7 to 1.0 s over 10 to 12 GB checked, moves 0.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_STACKS every 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):

Samples Innermost VIctory frames
10 xmem::map < XMemMapPhysicalPages < XMemMapPhysicalPagesScatter (the title's own mapping calls)
10 xmem::map / xmem::unmap < map_alias < queue::copy_page_mappings
8 host::read_partial (under Shadow::copy and HostList::run_deferred)
8 host::for_regions < Shadow::copy
6 watch::writes (under Shadow::update_free and Staging::refresh_now)
4 Vec::append_elements < HostList::run_deferred
3 host::write_mapped < copy_back
3 blake3_hash_many_avx512
3 WaitForSingleObject < 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:

Call Cost
GetWriteWatch with reset over 4 GB of write-watched memory, 0 to 100,000 dirty pages 0.5 to 1.7 ms
1,700 GetWriteWatch askings of 6 MB each 1.8 ms
VirtualProtect of a 64 KiB block of a section view about 2.4 µs
a write fault taken by a vectored handler that reopens the block about 2.3 µs
placeholder split + MapViewOfFile3 of a 64 KiB view about 7.5 µs
UnmapViewOfFile2 keeping the placeholder about 3.7 µs

The title's watches line 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.

**@⁠Mumogg** on GitHub · 2026-11-24 14:30 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7134483895) 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.dll` from GE-Proton11-14. Diag build of `ffe310e` + #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`, compute `eeed82b877b44b5f` skipped, `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` (`watches` 0.7 to 1.0 s over 10 to 12 GB checked, `moves` 0.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_STACKS` every 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): | Samples | Innermost VIctory frames | |---|---| | 10 | `xmem::map` < `XMemMapPhysicalPages` < `XMemMapPhysicalPagesScatter` (the title's own mapping calls) | | 10 | `xmem::map` / `xmem::unmap` < `map_alias` < `queue::copy_page_mappings` | | 8 | `host::read_partial` (under `Shadow::copy` and `HostList::run_deferred`) | | 8 | `host::for_regions` < `Shadow::copy` | | 6 | `watch::writes` (under `Shadow::update_free` and `Staging::refresh_now`) | | 4 | `Vec::append_elements` < `HostList::run_deferred` | | 3 | `host::write_mapped` < `copy_back` | | 3 | `blake3_hash_many_avx512` | | 3 | `WaitForSingleObject` < `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: | Call | Cost | |---|---| | `GetWriteWatch` with reset over 4 GB of write-watched memory, 0 to 100,000 dirty pages | 0.5 to 1.7 ms | | 1,700 `GetWriteWatch` askings of 6 MB each | 1.8 ms | | `VirtualProtect` of a 64 KiB block of a section view | about 2.4 µs | | a write fault taken by a vectored handler that reopens the block | about 2.3 µs | | placeholder split + `MapViewOfFile3` of a 64 KiB view | about 7.5 µs | | `UnmapViewOfFile2` keeping the placeholder | about 3.7 µs | The title's `watches` line 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.
Author
Owner

@⁠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:06 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7135463270) 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.
Author
Owner

@⁠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:14 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7135683454) 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).
Author
Owner

@⁠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.

**@⁠Machad3x** on GitHub · 2026-11-24 15:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7136816159) 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.
Author
Owner

@⁠Astronaut10 on GitHub · 2026-11-24 17:57 UTC · original

Two notes from a PS5 relinker (AnyPS5) that went through the same phase:

  • In ours, changes that each removed 3–18 ms from one stage (copies, GPU, one CPU thread) mostly left the frame where it was, because the next stage then set it; a batch of them came to +1.6 % in total. #322 here looks the same: preparing and copy-back shrink, the frame stays inside main's range. Judging each PR on the component it targets, in ms per frame and against main's run-to-run spread, says more than the frame time does.
  • Worth checking how much of the ~0.7 GB that changes per frame was written by copy-back rather than by the title's CPU code. In ours, the uploads were almost entirely the GPU's own bytes coming back.

AI-assisted (Claude Code); no GTA VI data.

**@⁠Astronaut10** on GitHub · 2026-11-24 17:57 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7139954425) Two notes from a PS5 relinker (AnyPS5) that went through the same phase: - In ours, changes that each removed 3–18 ms from one stage (copies, GPU, one CPU thread) mostly left the frame where it was, because the next stage then set it; a batch of them came to +1.6 % in total. #322 here looks the same: preparing and copy-back shrink, the frame stays inside `main`'s range. Judging each PR on the component it targets, in ms per frame and against `main`'s run-to-run spread, says more than the frame time does. - Worth checking how much of the ~0.7 GB that changes per frame was written by copy-back rather than by the title's CPU code. In ours, the uploads were almost entirely the GPU's own bytes coming back. AI-assisted (Claude Code); no GTA VI data.
Author
Owner

@⁠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/ntsync present), 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 (/proc user+kernel times over a 60 s window in the world):

CPU in 60 s
wineserver (one thread) 51.9 s user, 0.4 s kernel
the whole title process, all threads 30.3 s user, 2.7 s kernel
its busiest thread 6.8 s + 0.6 s

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 record on it, user space, 40 s in the world, 17,012 samples):

symbol share
is_valid_view_addr 57.2%
req_unmap_view 42.7%
everything else 0.1%

3. Why (counters added in xmem.rs, per 5 s in the world):

views held in Physical::views 92,000 to 100,600
views unmapped (UnmapViewOfFile2) 500 to 5,700 per 5 s
map_alias calls / pages 630 to 3,400 / 280 to 3,300 (nearly always one page per call)

The 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, and is_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; a top during 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).

**@⁠Mumogg** on GitHub · 2026-11-24 19:08 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7141657824) 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/ntsync` present), 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** (`/proc` user+kernel times over a 60 s window in the world): | | CPU in 60 s | |---|---| | wineserver (one thread) | 51.9 s user, 0.4 s kernel | | the whole title process, all threads | 30.3 s user, 2.7 s kernel | | its busiest thread | 6.8 s + 0.6 s | 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 record` on it, user space, 40 s in the world, 17,012 samples): | symbol | share | |---|---| | `is_valid_view_addr` | 57.2% | | `req_unmap_view` | 42.7% | | everything else | 0.1% | **3. Why** (counters added in `xmem.rs`, per 5 s in the world): | | | |---|---| | views held in `Physical::views` | 92,000 to 100,600 | | views unmapped (`UnmapViewOfFile2`) | 500 to 5,700 per 5 s | | `map_alias` calls / pages | 630 to 3,400 / 280 to 3,300 (nearly always one page per call) | The 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, and `is_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; a `top` during 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).*
Author
Owner

@⁠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) of main ffe310e, each run with its own empty VICTORY_CACHE_DIR, VICTORY_D3D12_DRED=1, the same VICTORY_KEYS as 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.

main ffe310e, three runs (ms per world frame):

run frame preparing (copies) textures on the GPU copying back draws/frame dropped without a pipeline / indirect device removed
1 972 554 (410 ms, 255 MB) 29 178 155 2178 1391 / 1611 143 s
2 873 527 (391 ms, 254 MB) 28 179 135 2501 999 / 1784 170 s
3 679 366 (267 ms, 161 MB) 21 157 109 1882 926 / 1444 76 s

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.

  • Same shape as on the RTX 5070 Ti: copies into title memory are the largest part of a frame (267–410 ms), then copying back (109–155 ms).
  • GPU time is lower and steadier here (157–179 ms against 179–322 ms), with fewer refreshes per frame (9–11 k against 33–35 k) at this commit.
  • Run 3 only had four world lines before the failure, so its averages are the least reliable.

The failures: all three runs end in a GPU page fault rather than a plain hang, two of them inside freed textures (DRED):

  • run 1: page fault at 0x4273d0000; inside freed ["texture 2048x2048 f98 flags 0x0 (type 34)", "texture 2048x2048 f98 flags 0x0 (type 34)"]
  • run 2: page fault at 0x46c33b000 (between two title memory copies, no freed resource named)
  • run 3: 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.

**@⁠Daniel333313131** on GitHub · 2026-11-24 19:40 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7142428051) 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`) of `main` `ffe310e`, each run with its own empty `VICTORY_CACHE_DIR`, `VICTORY_D3D12_DRED=1`, the same `VICTORY_KEYS` as 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. **`main` `ffe310e`, three runs** (ms per world frame): | run | frame | preparing (copies) | textures | on the GPU | copying back | draws/frame | dropped without a pipeline / indirect | device removed | |---|---|---|---|---|---|---|---|---| | 1 | 972 | 554 (410 ms, 255 MB) | 29 | 178 | 155 | 2178 | 1391 / 1611 | 143 s | | 2 | 873 | 527 (391 ms, 254 MB) | 28 | 179 | 135 | 2501 | 999 / 1784 | 170 s | | 3 | 679 | 366 (267 ms, 161 MB) | 21 | 157 | 109 | 1882 | 926 / 1444 | 76 s | 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. - Same shape as on the RTX 5070 Ti: copies into title memory are the largest part of a frame (267–410 ms), then copying back (109–155 ms). - GPU time is lower and steadier here (157–179 ms against 179–322 ms), with fewer refreshes per frame (9–11 k against 33–35 k) at this commit. - Run 3 only had four world lines before the failure, so its averages are the least reliable. **The failures:** all three runs end in a GPU page fault rather than a plain hang, two of them inside freed textures (DRED): - run 1: `page fault at 0x4273d0000; inside freed ["texture 2048x2048 f98 flags 0x0 (type 34)", "texture 2048x2048 f98 flags 0x0 (type 34)"]` - run 2: `page fault at 0x46c33b000` (between two title memory copies, no freed resource named) - run 3: `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.
Author
Owner

@⁠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.

**@⁠aycow** on GitHub · 2026-11-24 21:29 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7145004112) 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](https://github.com/aycow/VIctory/blob/e1676ed/docs/unwatched-texture-refresh-cost.md) 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.
Author
Owner

@⁠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:

  • #1267 takes a frame from 2.5–4.3 s to 0.8–1.2 s on this pattern, with snapshots going from ~2 s to ~0.25 s. It is the only one clearly outside main's spread.
  • #497 goes the same way with more spread.
  • #124 and #322 are slightly below main.
  • The rest stay within main's spread.
  • With #1267, copy-back is the largest part left. #124, which targets that part, conflicts with #1267.

These numbers are synthetic and measure wall time of the copy path only. They say nothing about fps in the title.

**@⁠marquezinii** on GitHub · 2026-11-24 21:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7145423432) 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: - **#1267** takes a frame from 2.5–4.3 s to 0.8–1.2 s on this pattern, with snapshots going from ~2 s to ~0.25 s. It is the only one clearly outside `main`'s spread. - #497 goes the same way with more spread. - #124 and #322 are slightly below `main`. - The rest stay within `main`'s spread. - With #1267, copy-back is the largest part left. #124, which targets that part, conflicts with #1267. These numbers are synthetic and measure wall time of the copy path only. They say nothing about fps in the title.
Author
Owner

@⁠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 940d32f showed 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 main 13f91ca unless noted:

  • RTX 2080 (Windows 10, diag build, warm cache): about 2 s per frame; preparing 921 ms (copies only 286 ms), GPU 519 ms, copying back 431 ms, CPU and GPU both mostly idle. The reporter attributes the time to write tracking rather than copying: about 3,800 VirtualProtect calls and 940 write faults per frame, with the guard lock in crates/victory-gpu/src/watch.rs held 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 of main.
  • RX 7900 XT (64-lane, diag build): answers the earlier request for which commands hold the GPU time. GPU commands are about 180 ms of a 900 ms frame, spread over many pipelines; VICTORY_SHADER_LOOP_LIMIT=4096 and a local patch moving the page table into video memory changed nothing. VICTORY_COPIES_IN_VIDEO_MEMORY=1 drops the menus to 2 fps on this card because the CPU reads write-combined memory.
  • RTX 5070 Ti, 32-lane: a GPU-command split on a third-party fork, about 120 ms of title commands in 186 ms "on the GPU". It is not 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

**@⁠Marvisak** on GitHub · 2026-11-25 01:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7149974564) · edited 2026-11-25 21:44 UTC <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T21:27:14Z at=2026-11-25T21:47:00Z --> Automated triage for the maintainers. This issue stays where the world frame-time breakdown is tracked. Earlier runs on `940d32f` showed 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 `main` `13f91ca` unless noted: - **RTX 2080 (Windows 10, diag build, warm cache):** about 2 s per frame; preparing 921 ms (copies only 286 ms), GPU 519 ms, copying back 431 ms, CPU and GPU both mostly idle. The reporter attributes the time to write tracking rather than copying: about 3,800 `VirtualProtect` calls and 940 write faults per frame, with the guard lock in `crates/victory-gpu/src/watch.rs` held 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 of `main`. - **RX 7900 XT (64-lane, diag build):** answers the earlier request for which commands hold the GPU time. GPU commands are about 180 ms of a 900 ms frame, spread over many pipelines; `VICTORY_SHADER_LOOP_LIMIT=4096` and a local patch moving the page table into video memory changed nothing. `VICTORY_COPIES_IN_VIDEO_MEMORY=1` drops the menus to 2 fps on this card because the CPU reads write-combined memory. - **RTX 5070 Ti, 32-lane:** a GPU-command split on a third-party fork, about 120 ms of title commands in 186 ms "on the GPU". It is not `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](https://claude.ai/code)_
Author
Owner

@⁠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 left

No 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.

path frame refresh (MB copied) snapshots / arming copy-back
declared-range snapshots (writing(.., false), what #1743 measures) 593–769 ms, median 711 70–78 ms (546) 338–465 ms 185–226 ms
marked pages (writing(.., true), the path tracked memory takes since cd94d35 / 940d32f) 75–80 ms, median 76 67–71 ms (552) 2.6–3.0 ms 5.0–5.2 ms

For the marked run the benchmark refreshes each declared range before arming it, as Host::execute does, sets each GPU write's page bit (Shadow::mark_entry) and copies back through copy_back_marks.

  • On this pattern, the snapshot and copy-back time most of the open copy PRs target is gone for tracked memory. What is left is the refresh: about 550 MB copied per frame, because each of the 256 scattered 8-byte title writes per submission dirties a whole 64 KiB page. watch.rs explains that finer units cost more than they saved on the world's buffers.
  • A sampling profile of the snapshot run puts about 52% in Shadow::writing (the snapshot copies), 25% in copy-back's compare and 10% in refresh, with ReadProcessMemory at 7% (#1010 removes that system call).
  • 6 GPU writes over the run stayed out of title memory, through the documented unarmed-page shortcut in 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.

**@⁠0xkn0wh3r3** on GitHub · 2026-11-25 03:12 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7151689442) **Synthetic re-measurement on current `main` (`940d32f`): with marked pages, snapshots and copy-back nearly vanish; refresh is what is left** No 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. | path | frame | refresh (MB copied) | snapshots / arming | copy-back | |---|---|---|---|---| | declared-range snapshots (`writing(.., false)`, what #1743 measures) | 593–769 ms, median 711 | 70–78 ms (546) | 338–465 ms | 185–226 ms | | marked pages (`writing(.., true)`, the path tracked memory takes since cd94d35 / 940d32f) | 75–80 ms, median 76 | 67–71 ms (552) | 2.6–3.0 ms | 5.0–5.2 ms | For the marked run the benchmark refreshes each declared range before arming it, as `Host::execute` does, sets each GPU write's page bit (`Shadow::mark_entry`) and copies back through `copy_back_marks`. - On this pattern, the snapshot and copy-back time most of the open copy PRs target is gone for tracked memory. What is left is the refresh: about 550 MB copied per frame, because each of the 256 scattered 8-byte title writes per submission dirties a whole 64 KiB page. `watch.rs` explains that finer units cost more than they saved on the world's buffers. - A sampling profile of the snapshot run puts about 52% in `Shadow::writing` (the snapshot copies), 25% in copy-back's compare and 10% in refresh, with `ReadProcessMemory` at 7% (#1010 removes that system call). - 6 GPU writes over the run stayed out of title memory, through the documented unarmed-page shortcut in `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.
Author
Owner

@⁠Feuris on GitHub · 2026-11-25 03:54 UTC · original

RX 6700 XT (RDNA2, 64-lane waves): a title run on current main 940d32f — tracked heaps do take the marked-page path, but refresh, GPU time and pipeline stalls still leave the world at 0.6–2 fps

This 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 10 10.0.26200; Rust 1.98.1. Title 7952987A, build b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93, Xbox Series X profile. Diag build (cargo build --profile diag -p victory --features diagnostics) of main 940d32f. DRED, WARP, GPU_TIMING and SHADER_LOOP_LIMIT all unset; VICTORY_LOG=info; same VICTORY_KEYS as the report (Enter every 3 s from 8 s to 47 s). Warm cache, not cold: %LOCALAPPDATA%\victory\cache had 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.

window world fps ms/frame preparing (copies) textures on the GPU copying back draws/frame dropped without a host pipeline / indirect
early 9 (incl. 2 transition lines) 2.1 1178 774 (670 ms, 160 MB) 9.6 174 45 931 398 / 612
last 9 0.6 2022 1198 (695 ms, 240 MB) 10.7 308 122 5879 735 / 963
last frame before the crash 0.3 3423 2833 (2240 ms) – 293 127 11711 669 / –

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 frame line (VIctory frame ~1437, 03:42:20 UTC):

  • 33.3 submissions, 75 title copies (0.4 MB), 21,974 refreshes asking for 20.6 GB
  • 254,139 write-watch askings, 36.0 ms in watches, 92.8 GB checked / 92.5 GB unchanged (99.7%)
  • 698,986 page faults; 7,147 protect calls for 9,528 pages; 74.8 ms in the guard handler
  • snapshots 563 MB in 31.7 ms; copy-back compared 0 MB; marked pages 1,996 compared / 77.6 MB written back in 74.4 ms
  • preparing steps: copy 142 ms, GPU writes 563 ms, heaps 97 ms, title memory 109 ms; working set 22.8 GB, 1,945 hard faults

There were also four slow host submission warnings: 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 log does not translate and one host mesh pipeline is refused with 0x80070057. Those explain the black frames and missing geometry, not the frame time.

What this adds

  • The marked-page path is taken. Copy-back is 45–122 ms and snapshots are 200–740 MB / 12–43 ms, not the multi-second snapshot/copy-back numbers from before cd94d35/940d32f. The synthetic comment's conclusion holds in the title.
  • Refresh is still the largest CPU component, but at a higher scale than the synthetic 550 MB/frame: ~10–21 GB asked per frame here, 99.7% unchanged, with 350k–800k page faults per frame. This matches the RX 6600 XT's observation that page faults dominate, and is consistent with many scattered small writes dirtying whole 64 KiB pages.
  • GPU time is 174–308 ms (one 678 ms outlier), higher than the 157–179 ms on the 7900 XTX comment. Note that comment had VICTORY_D3D12_DRED=1; this run has DRED off per #400, so the components are more comparable than the total frame times.
  • Draws waiting for pipelines do not go away with a warm cache: 735 dropped/frame on average late in the run, 963 indirect/frame. "being made" falls from ~1064 to ~472, so the cache fills, but the draw count grows to ~5,900/frame (peak 11,711) and the stalls remain.

Failures in the three copy configurations I tried

config result
default guarded copies Reached the world; title-side 0xC0000005 read of 0x0 at victory-image-b99f876b74d4a77f.dll+0x469627 at 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=none World reached: 1.2 fps / 833 ms, preparing 305 ms, copies ~0, GPU 478 ms, copy-back 12 ms. Then host GPU device removed 0x887A0006 after 12 lists at 48 s, preceded by unordered buffer view empty or past its host copy. Diagnostic-only: stale data, not a playable config.
VICTORY_COPY_MODE=plain Never reached the world (3–12 draws). 0xC0000005 in VCRUNTIME140.dll+0x1de4e, reading reserved-never-committed memory, after dstorage: a destination's physical pages could not be written warnings, 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

  1. Does victory-image+0x469627 map to a known title-side allocation failure under the memory pressure shown in the crash context?
  2. On RDNA2, is ~700k page faults/frame and 99.7% unchanged data the expected cost of the marked-page refresh path, or is there a finer-unit fix still worth trying?
  3. Given that refresh dominates and copy-back is already small here, which of the open copy PRs (#1267, #497, #1010, #322) is most worth a title run on this card?

I can attach the two crashcontext.log files 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.log and ...25864.crash.log
**@⁠Feuris** on GitHub · 2026-11-25 03:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7152354670) **RX 6700 XT (RDNA2, 64-lane waves): a title run on current `main` `940d32f` — tracked heaps do take the marked-page path, but refresh, GPU time and pipeline stalls still leave the world at 0.6–2 fps** This is the title run the maintainer triage asked for in https://git.gtahub.st/github/Marvisak--VIctory/issues/400 and https://git.gtahub.st/github/Marvisak--VIctory/issues/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 10 `10.0.26200`; Rust 1.98.1. Title `7952987A`, build `b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93`, Xbox Series X profile. Diag build (`cargo build --profile diag -p victory --features diagnostics`) of `main` `940d32f`. DRED, WARP, GPU_TIMING and SHADER_LOOP_LIMIT all unset; `VICTORY_LOG=info`; same `VICTORY_KEYS` as the report (Enter every 3 s from 8 s to 47 s). **Warm cache**, not cold: `%LOCALAPPDATA%\victory\cache` had 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. | window | world fps | ms/frame | preparing (copies) | textures | on the GPU | copying back | draws/frame | dropped without a host pipeline / indirect | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | early 9 (incl. 2 transition lines) | 2.1 | 1178 | 774 (670 ms, 160 MB) | 9.6 | 174 | 45 | 931 | 398 / 612 | | last 9 | 0.6 | 2022 | 1198 (695 ms, 240 MB) | 10.7 | 308 | 122 | 5879 | 735 / 963 | | last frame before the crash | 0.3 | 3423 | 2833 (2240 ms) | – | 293 | 127 | 11711 | 669 / – | 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 frame` line (VIctory frame ~1437, 03:42:20 UTC): - 33.3 submissions, 75 title copies (0.4 MB), **21,974 refreshes asking for 20.6 GB** - 254,139 write-watch askings, 36.0 ms in watches, **92.8 GB checked / 92.5 GB unchanged (99.7%)** - 698,986 page faults; 7,147 protect calls for 9,528 pages; 74.8 ms in the guard handler - snapshots 563 MB in 31.7 ms; copy-back compared 0 MB; marked pages 1,996 compared / 77.6 MB written back in 74.4 ms - preparing steps: copy 142 ms, GPU writes 563 ms, heaps 97 ms, title memory 109 ms; working set 22.8 GB, 1,945 hard faults There were also four `slow host submission` warnings: 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 log `does not translate` and one host mesh pipeline is refused with `0x80070057`. Those explain the black frames and missing geometry, not the frame time. ### What this adds - **The marked-page path is taken.** Copy-back is 45–122 ms and snapshots are 200–740 MB / 12–43 ms, not the multi-second snapshot/copy-back numbers from before `cd94d35`/`940d32f`. The synthetic comment's conclusion holds in the title. - **Refresh is still the largest CPU component**, but at a higher scale than the synthetic 550 MB/frame: ~10–21 GB asked per frame here, 99.7% unchanged, with 350k–800k page faults per frame. This matches the RX 6600 XT's observation that page faults dominate, and is consistent with many scattered small writes dirtying whole 64 KiB pages. - **GPU time is 174–308 ms** (one 678 ms outlier), higher than the 157–179 ms on the 7900 XTX comment. Note that comment had `VICTORY_D3D12_DRED=1`; this run has DRED off per https://git.gtahub.st/github/Marvisak--VIctory/issues/400, so the components are more comparable than the total frame times. - **Draws waiting for pipelines do not go away with a warm cache**: 735 dropped/frame on average late in the run, 963 indirect/frame. "being made" falls from ~1064 to ~472, so the cache fills, but the draw count grows to ~5,900/frame (peak 11,711) and the stalls remain. ### Failures in the three copy configurations I tried | config | result | | --- | --- | | default guarded copies | Reached the world; title-side `0xC0000005` read of `0x0` at `victory-image-b99f876b74d4a77f.dll+0x469627` at 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=none` | World reached: 1.2 fps / 833 ms, preparing 305 ms, copies ~0, GPU 478 ms, copy-back 12 ms. Then `host GPU device removed` `0x887A0006` after 12 lists at 48 s, preceded by `unordered buffer view empty or past its host copy`. Diagnostic-only: stale data, not a playable config. | | `VICTORY_COPY_MODE=plain` | Never reached the world (3–12 draws). `0xC0000005` in `VCRUNTIME140.dll+0x1de4e`, reading reserved-never-committed memory, after `dstorage: a destination's physical pages could not be written` warnings, 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 1. Does `victory-image+0x469627` map to a known title-side allocation failure under the memory pressure shown in the crash context? 2. On RDNA2, is ~700k page faults/frame and 99.7% unchanged data the expected cost of the marked-page refresh path, or is there a finer-unit fix still worth trying? 3. Given that refresh dominates and copy-back is already small here, which of the open copy PRs (#1267, #497, #1010, #322) is most worth a title run on this card? I can attach the two `crashcontext.log` files 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.log` and `...25864.crash.log`
Author
Owner

@⁠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 main 940d32f, 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 main would tell, from anyone who has the world running (a 64-lane card shows the lighting passes too):

  1. VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1 (diagnostics build), a few world frames. The log then has slow host list lines, each followed by slow 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.
  2. VICTORY_SHADER_LOOP_LIMIT=4096 against 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 05:18 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7153651245) **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 `main` `940d32f`, 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 `main` would tell, from anyone who has the world running (a 64-lane card shows the lighting passes too): 1. **`VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1`** (diagnostics build), a few world frames. The log then has `slow host list` lines, each followed by `slow 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. 2. **`VICTORY_SHADER_LOOP_LIMIT=4096`** against 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
Author
Owner

@⁠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::execute itself: 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. On main 940d32f (Ryzen 7 7800X3D, WARP, diag profile with diagnostics):

  • Preparing is 168–225 ms a frame. Half of it is checking host copies nothing wrote: 332–354 ns a check, 274,094 times.
  • The GPU writes step (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.
  • A guard's round (the title's write, the fault, the next refresh) costs 7–13 µs a page and causes 0.0 page faults a page, on write-watched pools and on views alike. So the ~700,000 page faults a frame are not the guards', and a finer unit than 64 KiB would not remove them (question 2 above). The only frame here with that many faults is the first, which touches every copy for the first time.
  • The same volumes cost about a sixth of the title's time here. Either each operation costs several times more in the title, or the time is in work these counters do not count.

The two fixes.

  • #2136: a host copy nothing wrote is left out of the refresh batch with one atomic read. Synthetic: preparing 225.1 → 100.8 ms and 168.1 → 81.9 ms, checks 274,094 → 1,325, the same bytes copied and pages guarded.
  • #2147: ranges shaders may write are armed as runs of pages. Synthetic: 31–36 µs → under 0.05 µs a declaration; too small to see in the synthetic frame, and how many declarations a world frame makes is not published.

Both together, on 940d32f, with no other change: branch testers/preparing-skip-arm of r4tedx/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:

  1. the frame-rate line;
  2. the whole copies per frame: line, unshortened, and the guard lock held per frame: line under it.

The fields that decide it: refreshes … skipped (the copies left out), watches … MB checked, the steps GPU writes and title memory, and preparing. From the main line 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

**@⁠r4tedx** on GitHub · 2026-11-25 06:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7154516882) **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::execute` itself: 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. On `main` `940d32f` (Ryzen 7 7800X3D, WARP, `diag` profile with `diagnostics`): - Preparing is 168–225 ms a frame. Half of it is checking host copies nothing wrote: 332–354 ns a check, 274,094 times. - The `GPU writes` step (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. - A guard's round (the title's write, the fault, the next refresh) costs 7–13 µs a page and causes 0.0 page faults a page, on write-watched pools and on views alike. So the ~700,000 page faults a frame are not the guards', and a finer unit than 64 KiB would not remove them (question 2 above). The only frame here with that many faults is the first, which touches every copy for the first time. - The same volumes cost about a sixth of the title's time here. Either each operation costs several times more in the title, or the time is in work these counters do not count. **The two fixes.** - #2136: a host copy nothing wrote is left out of the refresh batch with one atomic read. Synthetic: preparing 225.1 → 100.8 ms and 168.1 → 81.9 ms, checks 274,094 → 1,325, the same bytes copied and pages guarded. - #2147: ranges shaders may write are armed as runs of pages. Synthetic: 31–36 µs → under 0.05 µs a declaration; too small to see in the synthetic frame, and how many declarations a world frame makes is not published. Both together, on `940d32f`, with no other change: branch `testers/preparing-skip-arm` of `r4tedx/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: 1. the frame-rate line; 2. the whole `copies per frame:` line, unshortened, and the `guard lock held per frame:` line under it. The fields that decide it: `refreshes … skipped` (the copies left out), `watches … MB checked`, the steps `GPU writes` and `title memory`, and `preparing`. From the `main` line 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
Author
Owner

@⁠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 main 13f91ca plus #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 is graphics_1.

Where a frame goes on main (warm, per frame, averaged over the run):

frame 1,977 ms (3,070 frames in 12 min)
preparing 921 ms, of which copies are only 286 ms
GPU 519 ms
copying back 431 ms
utilisation CPU 18% of all threads, GPU 27%

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).
  • The write-fault handler: 939 faults a frame, 409–449 ms (about 450 µs a fault, mostly waiting for the guard lock).
  • The guard lock is held about 600 ms a frame in all: watch.rs:709 (writing) 174 ms, :493 (taken) 167 ms, :451 (take_split) 142 ms, :810 (the fault handler) 111 ms.
  • Title threads waiting to write views: 644 ms a frame.
  • Tracked pages written a frame: 1,607, of which 1,176 were also written the frame before.

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):

  • Refreshes on several threads (flush grouped 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.
  • Leaving pages written every frame unguarded (a page faulting in two frames in a row skipped by protect_noting for 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 VirtualProtect calls out of the guard lock looks unsafe as it stands: the fault handler relies on the protection and protected changing 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.

**@⁠lhnizdo** on GitHub · 2026-11-25 20:49 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7174248468) Measurements from an **RTX 2080 (32-lane waves), Windows 10 19045, Ryzen 7 2700X (16 threads)**, on `main` `13f91ca` plus #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 is `graphics_1`. **Where a frame goes on `main` (warm, per frame, averaged over the run):** | | | |---|---| | frame | 1,977 ms (3,070 frames in 12 min) | | preparing | 921 ms, of which copies are only **286 ms** | | GPU | 519 ms | | copying back | 431 ms | | utilisation | CPU 18% of all threads, GPU 27% | 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). - **The write-fault handler:** 939 faults a frame, **409–449 ms** (about 450 µs a fault, mostly waiting for the guard lock). - **The guard lock is held about 600 ms a frame in all:** `watch.rs:709` (`writing`) 174 ms, `:493` (`taken`) 167 ms, `:451` (`take_split`) 142 ms, `:810` (the fault handler) 111 ms. - **Title threads waiting to write views:** 644 ms a frame. - **Tracked pages written a frame:** 1,607, of which **1,176 were also written the frame before.** 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):** - **Refreshes on several threads** (`flush` grouped 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. - **Leaving pages written every frame unguarded** (a page faulting in two frames in a row skipped by `protect_noting` for 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 `VirtualProtect` calls out of the guard lock looks unsafe as it stands: the fault handler relies on the protection and `protected` changing 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.
Author
Owner

@⁠tumbubu on GitHub · 2026-11-25 21:16 UTC · original

RX 7900 XT (RDNA3, 64-lane waves), in the world on main 13f91ca: 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.

  • Setup: AMD Radeon RX 7900 XT, driver 32.0.31036.15, waves 32..64; Windows 11 Pro 26300.
  • Build: diag build (--profile diag --features diagnostics) of 13f91ca, cache warmed with translate --cache --pipelines.
  • Runs: VICTORY_LOG=info, Enter every 3 s from 8 s to 47 s, 180 s each.
  • What counts as world: every frame-rate line under 10 fps with at least 500 draws.
  • GPU timing: the per-pipeline averages are over the GPU timing reports with more than 50 ms of commands per frame.
run fps ms/frame preparing (copies) on the GPU copying back draws/frame
main 1.53 918 379 (128) 199 93 3913
VICTORY_SHADER_LOOP_LIMIT=4096 1.66 712 409 (155) 178 86 4370
page tables in a GPU upload heap (local diag patch, below) 1.82 636 326 (143) 190 87 2985

The 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.

ms/frame commands/frame command
21.0 ~190 dispatch [compute caa78b8ca62bc3d6]
19.1 ~90 dispatch [compute 28918b7150a7aad5]
9.4 1 dispatch [compute 39f0e9aeb156a61c]
6.2 1 indirect [compute f22a76fcb967ee59]
4.8 ~140 indirect [compute 660814153af43185]
4.7 ~430 indirect [mesh 910b4be059bfb28f, pixel bff8660bf8e29c26]
  • No single pipeline dominates. The two compute programs at the top are 40 ms of 183.
  • Their slow dispatches take 1–27 ms each, and the time does not follow the group count. 1x1x1 dispatches of both take up to 25–27 ms (mean about 8 ms over 22 of them), and a 7103x1x1 one of 28918b7150a7aad5 takes 26.9 ms.
  • The clamp dispatches before indirect executions do not show up in the top 25.

2. Loop limit 4096 against the default: no change. Commands are 181.5 ms/frame. caa78b8ca62bc3d6 takes 23.6 ms and 28918b7150a7aad5 20.6 ms, and the 1x1x1 dispatches 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, 28918b7150a7aad5 22.2 ms and caa78b8ca62bc3d6 19.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:

  • On this card the GPU is about a fifth of a world frame.
  • Preparing and copying back, both CPU work, are about 470 ms.
  • Another ~250 ms is outside the submissions.
  • I have no explanation yet for single-group dispatches of 25 ms. Loop limits and page-table latency are now ruled out.

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.

**@⁠tumbubu** on GitHub · 2026-11-25 21:16 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7174859244) **RX 7900 XT (RDNA3, 64-lane waves), in the world on `main` `13f91ca`: 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. - **Setup:** AMD Radeon RX 7900 XT, driver 32.0.31036.15, waves 32..64; Windows 11 Pro 26300. - **Build:** diag build (`--profile diag --features diagnostics`) of `13f91ca`, cache warmed with `translate --cache --pipelines`. - **Runs:** `VICTORY_LOG=info`, Enter every 3 s from 8 s to 47 s, 180 s each. - **What counts as world:** every frame-rate line under 10 fps with at least 500 draws. - **GPU timing:** the per-pipeline averages are over the `GPU timing` reports with more than 50 ms of commands per frame. | run | fps | ms/frame | preparing (copies) | on the GPU | copying back | draws/frame | |---|---:|---:|---:|---:|---:|---:| | `main` | 1.53 | 918 | 379 (128) | 199 | 93 | 3913 | | `VICTORY_SHADER_LOOP_LIMIT=4096` | 1.66 | 712 | 409 (155) | 178 | 86 | 4370 | | page tables in a GPU upload heap (local diag patch, below) | 1.82 | 636 | 326 (143) | 190 | 87 | 2985 | The 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. | ms/frame | commands/frame | command | |---:|---:|---| | 21.0 | ~190 | dispatch `[compute caa78b8ca62bc3d6]` | | 19.1 | ~90 | dispatch `[compute 28918b7150a7aad5]` | | 9.4 | 1 | dispatch `[compute 39f0e9aeb156a61c]` | | 6.2 | 1 | indirect `[compute f22a76fcb967ee59]` | | 4.8 | ~140 | indirect `[compute 660814153af43185]` | | 4.7 | ~430 | indirect `[mesh 910b4be059bfb28f, pixel bff8660bf8e29c26]` | - No single pipeline dominates. The two compute programs at the top are 40 ms of 183. - Their slow dispatches take 1–27 ms each, and the time does not follow the group count. `1x1x1` dispatches of both take up to 25–27 ms (mean about 8 ms over 22 of them), and a `7103x1x1` one of `28918b7150a7aad5` takes 26.9 ms. - The clamp dispatches before indirect executions do not show up in the top 25. **2. Loop limit 4096 against the default:** no change. Commands are 181.5 ms/frame. `caa78b8ca62bc3d6` takes 23.6 ms and `28918b7150a7aad5` 20.6 ms, and the `1x1x1` dispatches 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, `28918b7150a7aad5` 22.2 ms and `caa78b8ca62bc3d6` 19.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:** - On this card the GPU is about a fifth of a world frame. - Preparing and copying back, both CPU work, are about 470 ms. - Another ~250 ms is outside the submissions. - I have no explanation yet for single-group dispatches of 25 ms. Loop limits and page-table latency are now ruled out. 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.
Author
Owner

@⁠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 at 9376fd6, 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.

command kind ms/frame commands/frame
indirect 72.4 5,165
dispatch 39.0 3,853
mesh 4.1
alias copy 1.9
sum of the title's commands 119.7
frame line, "on the GPU" 185.8
  • About 66 ms a frame of "on the GPU" is outside the title's commands. The card was about 53% busy, idle behind the submitting thread.
  • Heaviest single dispatches: compute 5cf00dc39042edaf 7.2 ms, 14264103296aa43a 5.7 ms, 0a5ecfee6b79e13b 3.0 ms. Heaviest indirect mesh: ef5409053e14aa82/94d281151ca58b4f, 6.3 ms in 197 commands.
  • 7 wave64 compute pipelines were refused on this card (WaveSize 64 on a 32-lane host), so those programs are not in these sums.
  • No SHADER_LOOP_LIMIT comparison was run on this tree.
**@⁠HLVM04** on GitHub · 2026-11-25 21:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7175097133) 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 at `9376fd6`, 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. | command kind | ms/frame | commands/frame | |---|---:|---:| | indirect | 72.4 | 5,165 | | dispatch | 39.0 | 3,853 | | mesh | 4.1 | | | alias copy | 1.9 | | | sum of the title's commands | 119.7 | | | frame line, "on the GPU" | 185.8 | | - About 66 ms a frame of "on the GPU" is outside the title's commands. The card was about 53% busy, idle behind the submitting thread. - Heaviest single dispatches: compute `5cf00dc39042edaf` 7.2 ms, `14264103296aa43a` 5.7 ms, `0a5ecfee6b79e13b` 3.0 ms. Heaviest indirect mesh: `ef5409053e14aa82`/`94d281151ca58b4f`, 6.3 ms in 197 commands. - 7 wave64 compute pipelines were refused on this card (WaveSize 64 on a 32-lane host), so those programs are not in these sums. - No `SHADER_LOOP_LIMIT` comparison was run on this tree.
Author
Owner

@⁠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 and VICTORY_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 ExecuteIndirect argument 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.

**@⁠Venom2054** on GitHub · 2026-11-26 08:16 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7186390589) 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 and `VICTORY_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 `ExecuteIndirect` argument 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.
Author
Owner

@⁠RobertAndreiGit on GitHub · 2026-11-26 13:31 UTC · original

Another NVIDIA data point on copy preparation after world entry. Downstream cool_fox (f4b48ad766dd base, local host-temporal 4d8e5728a3df), 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.

Pipeline wait Frame Preparation (copies alone) Copy volume Copy-back time / volume
500 ms 455.8 ms 244.1 ms (199.4 ms) 84.0 MB 47.2 ms / 27.6 MB
24 ms 288.4 ms 206.3 ms (149.1 ms) 68.7 MB 45.5 ms / 28.9 MB

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:

  • An earlier release comparison of the original path / adaptive path / cache fix plus indexed range lookup gave 502.1 / 540.2 / 553.6 ms (15 samples each). No demonstrated sustained-FPS benefit from the combination; we didn’t isolate the lookup.
  • GPU keep-awake: no pairs passed the original sampling rule. Eight exploratory, draw-matched pairs had median on/off frame-time ratio 1.0035. No clear advantage.
  • A device test verified that the non-sparse material cap actually changes the physical texture: 2048 wide / 12 mips → 512 wide / 10 mips. The user could see the world on that build, but it still ran slowly. A request for 960×540 alone left the composite at 1920×1080; we could not verify a 540p world render.

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.

**@⁠RobertAndreiGit** on GitHub · 2026-11-26 13:31 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7193466384) <!-- cool-fox-world-3060ti-20261126:victory-400.md --> **Another NVIDIA data point on copy preparation after world entry.** Downstream `cool_fox` (`f4b48ad766dd` base, local host-temporal `4d8e5728a3df`), 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. | Pipeline wait | Frame | Preparation (copies alone) | Copy volume | Copy-back time / volume | |---|---:|---:|---:|---:| | 500 ms | 455.8 ms | 244.1 ms (199.4 ms) | 84.0 MB | 47.2 ms / 27.6 MB | | 24 ms | 288.4 ms | 206.3 ms (149.1 ms) | 68.7 MB | 45.5 ms / 28.9 MB | 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: - An earlier release comparison of the original path / adaptive path / cache fix plus indexed range lookup gave **502.1 / 540.2 / 553.6 ms** (15 samples each). No demonstrated sustained-FPS benefit from the combination; we didn’t isolate the lookup. - GPU keep-awake: no pairs passed the original sampling rule. Eight exploratory, draw-matched pairs had median on/off frame-time ratio **1.0035**. No clear advantage. - A device test verified that the non-sparse material cap actually changes the physical texture: 2048 wide / 12 mips → 512 wide / 10 mips. The user could see the world on that build, but it still ran slowly. A request for 960×540 alone left the composite at 1920×1080; we could not verify a 540p world render. 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.
Author
Owner

@⁠potatoe0100 on GitHub · 2026-11-26 14:11 UTC · original

For anyone comparing numbers here: #2147 (781e846) and #2377 (106377d) have since merged, after 13f91ca. The 13f91ca measurements in this thread don't include them; current main (63bcca4) does.

AI-assisted (Claude)

**@⁠potatoe0100** on GitHub · 2026-11-26 14:11 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7194401719) For anyone comparing numbers here: #2147 (781e846) and #2377 (106377d) have since merged, after `13f91ca`. The `13f91ca` measurements in this thread don't include them; current `main` (`63bcca4`) does. AI-assisted (Claude)
Author
Owner

@⁠zed6000 on GitHub · 2026-11-26 16:30 UTC · original

An AMD data point: RX 7900 XTX, main against 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.

build busy lines fps ms/frame preparing (copies) textures on the GPU copying back draws/frame dropped without a host pipeline shaders that do not translate
main 63bcca4 97 1.9 520 225 (95 ms, 489 MB) 28 152 66 2,917 206 8
stack (main + #1924 port, #2978, #385, #2999, #1737, #3016, #2363, #1738, and the #2930 states) 16 1.6 632 236 (120 ms, 555 MB) 28 154 77 2,650 371 0
  • Both builds: 30 fps from boot through the menus (13 draws/frame, 0 dropped). The intro then runs at 1–2 fps. No hang or device removal in either run (about 10 and 2.5 minutes).
  • 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.
  • Stack: all of those shaders translate. Visible result: a large improvement, with characters' faces now drawn properly. Parts of scenes are still missing, some overlays are wrong, and blocky areas cover parts of some scenes.
  • Dropped draws still happen on the stack, without any shader failing and with no pipeline waiting to be made at the time of each line. The release build does not say why. I plan to follow up with diagnostics builds of both.
  • The frame time looks like the split in this thread: preparing (mostly title-memory copies, 0.5 GB a frame) plus on the GPU plus copying back. The stack's copies are no cheaper.
**@⁠zed6000** on GitHub · 2026-11-26 16:30 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7197731203) **An AMD data point: RX 7900 XTX, `main` against 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. | build | busy lines | fps | ms/frame | preparing (copies) | textures | on the GPU | copying back | draws/frame | dropped without a host pipeline | shaders that do not translate | |---|---:|---:|---:|---|---:|---:|---:|---:|---:|---:| | `main` `63bcca4` | 97 | 1.9 | 520 | 225 (95 ms, 489 MB) | 28 | 152 | 66 | 2,917 | 206 | 8 | | stack (`main` + #1924 port, #2978, #385, #2999, #1737, #3016, #2363, #1738, and the #2930 states) | 16 | 1.6 | 632 | 236 (120 ms, 555 MB) | 28 | 154 | 77 | 2,650 | 371 | 0 | - **Both builds:** 30 fps from boot through the menus (13 draws/frame, 0 dropped). The intro then runs at 1–2 fps. No hang or device removal in either run (about 10 and 2.5 minutes). - **`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. - **Stack:** all of those shaders translate. Visible result: a large improvement, with characters' faces now drawn properly. Parts of scenes are still missing, some overlays are wrong, and blocky areas cover parts of some scenes. - **Dropped draws still happen on the stack, without any shader failing and with no pipeline waiting to be made at the time of each line.** The release build does not say why. I plan to follow up with diagnostics builds of both. - The frame time looks like the split in this thread: preparing (mostly title-memory copies, 0.5 GB a frame) plus on the GPU plus copying back. The stack's copies are no cheaper.
Author
Owner

@⁠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: main 63bcca4 + 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_KEYS Enter 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:

build fps frame preparing (copies) on the GPU copying back page faults/frame
base 2.4 415 199 (94 ms, 480 MB) 151 58 22 k
+ #3228 2.4 412 194 (91 ms, 478 MB) 151 60 19 k
+ #2428 2.4 409 191 (90 ms, 469 MB) 150 59 27 k
+ #2051 2.5 413 177 (71 ms, 483 MB) 150 63 24 k
+ #2705, VICTORY_CARD_COPIES=1 2.4 423 198 (99 ms, 484 MB) 148 65 24 k
+ #2993, VICTORY_VRAM_COPIES=1 2.4 416 198 (95 ms, 471 MB) 149 61 26 k
base, --console series-s 2.5 395 178 (97 ms, 484 MB) 124 38 20 k
base, release build 2.4 412 195 (95 ms, 479 MB) 151 60
  • All of these are within about ±2 % of the base, except Series S at −5 %. #2051 takes about 22 ms off the copies, but copying back grows by about the same, so the frame stays the same.
  • Both opt-in switches took effect. With #2705 the card held about 4 GB more video memory. #2993 logged 1,721 read-only buffers (117 MB) moved to video memory, with GPU upload heaps supported. Neither changed "on the GPU".
  • GPU time (VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1 on 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.
  • So on this machine the frame is preparing, then the GPU, then copying back, one after the other. The copies themselves are not the bottleneck. In preparing, guard faults (about 56–70 ms in the handler) and moves (about 52 ms) are the largest parts.
**@⁠zed6000** on GitHub · 2026-11-26 17:44 UTC · [original](https://github.com/Marvisak/VIctory/issues/400#issuecomment-7199562322) **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: `main` `63bcca4` + 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_KEYS` Enter 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: | build | fps | frame | preparing (copies) | on the GPU | copying back | page faults/frame | |---|---:|---:|---|---:|---:|---:| | base | 2.4 | 415 | 199 (94 ms, 480 MB) | 151 | 58 | 22 k | | + #3228 | 2.4 | 412 | 194 (91 ms, 478 MB) | 151 | 60 | 19 k | | + #2428 | 2.4 | 409 | 191 (90 ms, 469 MB) | 150 | 59 | 27 k | | + #2051 | 2.5 | 413 | **177 (71 ms, 483 MB)** | 150 | 63 | 24 k | | + #2705, `VICTORY_CARD_COPIES=1` | 2.4 | 423 | 198 (99 ms, 484 MB) | 148 | 65 | 24 k | | + #2993, `VICTORY_VRAM_COPIES=1` | 2.4 | 416 | 198 (95 ms, 471 MB) | 149 | 61 | 26 k | | base, `--console series-s` | 2.5 | 395 | 178 (97 ms, 484 MB) | 124 | 38 | 20 k | | base, release build | 2.4 | 412 | 195 (95 ms, 479 MB) | 151 | 60 | | - All of these are within about ±2 % of the base, except Series S at −5 %. #2051 takes about 22 ms off the copies, but copying back grows by about the same, so the frame stays the same. - Both opt-in switches took effect. With #2705 the card held about 4 GB more video memory. #2993 logged 1,721 read-only buffers (117 MB) moved to video memory, with GPU upload heaps supported. Neither changed "on the GPU". - **GPU time** (`VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1` on 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. - So on this machine the frame is preparing, then the GPU, then copying back, one after the other. The copies themselves are not the bottleneck. In preparing, guard faults (about 56–70 ms in the handler) and moves (about 52 ms) are the largest parts.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#400
No description provided.