Frame budget: where the time goes in the prison yard (RTX 5090, Linux/Wine), and which PRs move it #3425
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T00:45:00Z.
A frame budget for one fixed scene, so that performance PRs can be ranked by what they actually remove. Measured numbers only; I'll keep this updated as runs and PRs land. Others' rows for other GPUs/OSes are welcome in the same form.
Setup: RTX 5090 (driver 620.73.04), Linux, GE-Proton11-14 Wine with its vkd3d-proton.
main(63bcca4) plus the unmerged PRs this setup needs to render the world (#2723, #439, #233, #320, #2118, #2703, #2101, #1129, #2312), plus #2958, #3120 (overlap on), #2309, #2461, #3353/#3378, #3313. GTA VI's opening prison yard, a warm shader cache, diag build. Untimed numbers are medians of the last 30 frame-rate lines of a 600 s run; timed numbers come fromVICTORY_GPU_TIMING=1(which turns overlap off), with every command in the table rather than the log's top 25.The title caps itself at 30 fps (#2469), so the target is 33.3 ms.
Where we are
The CPU side and the GPU side run one after the other: with #3312 every submission waits for its own copy lists, so #3120's overlap no longer helps.
CPU side: ~136 ms per frame (best stack + #3341 + #2472)
shadow.rscopy-backshadow.rs/host.rsrefresh pathHostHeap::sync_slotsupload_vram_copies/readback_vram_copiesbindless::uploadsOne lock,
watch::GUARDS, is held ~49 ms/frame by our own paths, and the title spends 52 ms in its write-fault handler queueing behind it.GPU side: 155 ms of commands per frame (timed)
The untimed "on the GPU" figure (~240 ms) is mostly not GPU work: lists take ~176 ms of wall time, the rest is the CPU waiting on synchronous copies. With #3312 in,
GatherCopy(41 ms) and the BVH trace (28 ms) left the top of the table.Findings so far:
D3DCompile(E5005 'Load' on RWByteAddressBuffer,[RootSignature]ignored), so every log showsno batched argument clamp: falling back to inline. #3197's window shader has the same problem. A Wine-compilable version plus #3197 is being measured.Per-PR results on this setup
Still being measured: asynchronous read-back on top of #3312 (to restore the overlap), batched clamps (#2472 fix + #3197), #3387, #3343, #3305, #3289, #3320, #3246, and two small CPU fixes (heap mirroring, bindless uploads).
AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-27T01:15:33Z.
A row for a small card, with a different tree and scene, so it compares only loosely. RTX 3050 Laptop 4 GB (32-lane waves), Ryzen 7 7435HS, 24 GB RAM, Windows 11 native, Series S profile, a cool_fox-lineage tree, outdoor free play by a boat. Frame 150 to 154 ms (6.5 to 6.7 fps): 65 preparing, 70 on the GPU, 26 copy-back, in series. That is after skipping the 41
bvh_skinningprograms and bothCS_Primary_GatherCopyvariants. Before the skips, a batch timing that does not serialise the frame gave 128.5 ms of commands:GatherCopy49.7 in one command,bvh_skinning:*23.0, each G-buffer family under 4. One run per figure; night not checked with the skips.https://github.com/Dathinel/victory-4gb/issues/4
No game files or captures attached. Written with AI assistance (Claude Code).
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T03:54:16Z.
Update with this round's measurements (same setup as above; every comparison now uses a control run of the base taken right next to the candidate, because the same build drifted by up to ~25 ms between runs hours apart).
New best: 372 → ~315 ms per frame (3.2 fps) by making #3312's read-back asynchronous on top of #3120's overlap: the upload and read-back run as their own copy lists before and after the submission's lists on the same queue, and the CPU reads them in
finishonce the fence is reached. Also not reading back marked declared ranges whole (742 MB/frame that were discarded). Themain-compatible part is offered on #3312.main+ needed PRs + #3312 + #3318)Overlap stops there. With the waits for our own copies gone, 22 of 24 submissions per frame were still "heavy" (#3120's rule). A prototype that tracks writes per submission brought that to 6, with a correct picture, but no frame gain (312 vs 314 ms in adjacent runs): the title's queues are chained through label waits for values it writes once per frame, two frames ahead, so the title itself serializes. Held queue items are already released on completion. The remaining lever is making each part cheaper.
Per-PR results added:
fd7de0f6(read-sharedSHADER_HEAPSlock), which the author has since dropped; current head being measuredAI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T04:53:57Z.
Update: ~315 → 223 ms per frame (4.5 fps), from batching the indirect-argument clamps.
Pictures match the control at two late frames. Details on #2472 and #3197. Timed, GPU command time per frame went from 155 to 65 ms: the clamps from 35 to 10 ms (4,909 → 1,133), and the indirect draws themselves from 98 to 32 ms, because a barrier, a one-group dispatch and a rebind between every two draws had been breaking up the draw stream.
Where the frame goes now: the CPU side (preparing ~76 ms + copy-back ~58 ms) is larger than the GPU (~84 ms), and they still run one after the other. Next targets are the CPU table in the first post (copy-back of marked pages, refresh change checks, heap mirroring, bindless uploads, the
watch::GUARDSlock); the open PRs for them (#3246, #3289, #3305, #3320, #3343, #3387) are being measured.Also: #2848's current head (without the read-shared
SHADER_HEAPSlock) no longer adds preparing time here (79 ms vs 77-81 for its base).AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by borosf on 2026-11-27T11:36:34Z.
Others' rows are welcome, so here is the Intel Arc one. Same form, Windows, and a 12 GB card that caps shader-visible heaps at 1,000,000, which changes which PRs matter.
Setup: Intel Arc B580 12 GB, Windows 11 x64, Ryzen 5 5600, 32 GB RAM.
main(63bcca4) plus #2958 only — that is all this setup needs to reach a lit scene (before it the picture is a pink wash, #2703 removes the root-view offset drops). Warm shader cache,--profile diag --features diagnostics,--console series-x,VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1, 200 s run. Numbers are the last frame line and the last per-frame statistics line of that run, not medians of 30 (this card changes scene too slowly to collect 30); untimed rows are per frame.Where we are
main+ #2958The
+ #3419row is not a regression and not a win: it is a different point in the world with 1,175 more draws submitted per frame, because #3419 stops dropping them (see below). Timing on this card needs a fixed scene before such rows mean anything.CPU side, per frame (
copies per frameline, 200 s)SHADER_HEAPS, not workGPU writesstepprotectingReadProcessMemory)ReadProcessMemorywill not say where it stopped, so the retry re-copies the range from the start (#3358)Refresh bytes are 10,036.9 MB/frame asked for, merged per copy — the copy step is 15.7 ms, so that is not 10 GB of host traffic. Page faults are 37,007/frame total, 15,326 of them preparing. Working set 21,037 MB, 0 hard faults.
GPU side, after #2958
675.4 ms measured, class split: indirect compute 326.5 ms (43 %), direct dispatch 183.0, mesh/indexed 9.4. Top buckets:
indirect [compute 915ed81ea580a276]171.5 ms (the #898 lane),dispatch a7eeed0646be1ab752.95 (this is #2958's tile-mask reset, 1,866.2 ms before it),indirect bc6ca78d5425c17941.8,cb6adcc6da2613ff35.4.PRs measured on this card
CS_ResetTilesMask1,866.2 → 56.8 ms; frame 4,734.3 → 1,298.8 ms; GPU 4,158.7 → 759.6 ms. Also the picture: pink wash → lit scene.no dynamic slotsdrop events 201 → 0; the capped heap keepscount = 737,856, dynamic = 262,144instead of934,464 / 65,536. No draw reads a title slot past the cut (for_draw=true0 occurrences either way).Two Intel-only rows
count + DYNAMICandcount + MIN_DYNAMICboth fail and the fallback squeezes dynamic slots 4× (262,144 → 65,536), which costs 2,422 + 444 + 258 dropped draws/dispatches per frame. #3419 removes all of it. 310,720 title slots are unserved (507,328 warnings per heap build once #3419 widens the dynamic budget), none of them read by a draw.page fault at 0x8000…, reason text "GPU will not respond"): 1–3 runs in 4 here depending on the tree, and it also happens on a fork lineage without our commits. Tracked in #2671; not attributable to any PR in this table.Synthetic tests only in the tree; every number above is a run of the title on my own dump.
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T11:40:46Z.
@borosf thanks, that's exactly the form I hoped for, and the Intel row shows the same CPU-side shape we see on NVIDIA under Wine: waiting for the
SHADER_HEAPSlock is your largest item (105 ms) and one of ours too (74-88 ms in the same "title threads waiting to write views" counter). We traced ours to the heap sync holding that lock for its whole pass; a version that holds it per 16-page chunk is in our queue now, and I'll post the number here when it's in.A few of the PRs you list against these costs (#3484, #3395, #3472, #3439, #3419, #3437) aren't in our measurements yet; I'll run the ones that target our largest items on the same base and add them to the table.
AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-27T12:31:20Z.
A synthetic repro of the "title threads waiting to write views" row (borosf's 105 ms, neonbyte1's 74-88 ms), with A/Bs of the open PRs that touch it.
Bench:
sync_contention_bench(#[ignore]d; commitf34bcfb8cherry-picks onto any tree;cargo test -p victory-gpu --release sync_contention_bench -- --ignored --nocapture --test-threads=1).sync_heaps, while 5 title threads write a view every 20 µs into pages of their own.SYNC_BENCH_*variables change the shape.SYNC_BENCH_SLOTS=1245184 SYNC_BENCH_PAST_CAP=1gives the title's heap size, with pages past the cap.On
mainit reproduces the shape: a 9.6 ms sync leaves each title thread blocked for all of it, so the threads wait 49.5 ms per frame in total (per-write p99 9.7 ms, against 2-3 µs uncontended).RTX 4060 Laptop, each PR against its base
63bcca4, interleaved runs, medians:sync_heapsVirtualQueryon a guarded write-watch poolRwLock)Details are on each PR. The full
victory-gpusuite on RTX fails only the two tests thatmainalso fails here, on every tree. No tree lost a view or left one stale.What this suggests: shortening the sync (#3055) only scales the wait down. Making the lock shared (#2821, #2848's dropped
fd7de0f6, #3320's reverted change) removes the wait but moves cost onto the submitting thread, which is the +30 ms "preparing" that was measured in-game. Holding the lock per chunk sits between the two. @neonbyte1, I couldn't find your per-16-page-chunk version on a branch yet. When it's up, I'll run it through the same bench (or you can cherry-pickf34bcfb8; it prints sync time, wait and the lost-view check in one line). I'm not opening a PR of my own for this.AI use: Claude Code (Claude Opus 5.5).
Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-27T12:40:39Z.
On the
watch::GUARDSline above (our paths hold it ~49 ms/frame, the title waits ~52 ms in its fault handler): a CPU-side benchmark run againstmainand the four open PRs aimed at that lock, to rank them by what they remove.Bench:
guard_contention+refreshes_under_writes_lose_nothing, split out of #3516 as a standalone test-only commit anyone can apply: KainanP/VIctoryperf/guard-bench. 256 MB write-watched pool, 1,400 dirty pages per refresh, title threads writing every 20 µs during the refresh; it reports the refresh time, the writers' time in their writes, and their wait forGUARDS. i7-14650HX, Windows 11, release, 31 interleaved rounds, medians; other agents' compiles were running, so the per-round PR/main ratio is the number to read.Writers' wait for
GUARDS, PR /main(median of per-round ratios; ~±5 % is noise here):GUARDS, msVirtualProtectper fault remains, under the lock.retakeonly; the fault handler and takes still lock exclusively.VirtualProtectout of the lock. That removes the writers' wait behind takes, but faulting writes still cost ~20–30 µs each.refreshes_under_writes_lose_nothingpasses on all four heads and onmain(3 × 1,000 rounds each). So no lost write was found.What remains with several writers is the writers queueing behind each other's fault handler, which calls
VirtualProtectunderGUARDS. None of the open PRs moves that call out of the lock. That is the next target for the title-side ~52 ms.AI use: Claude Code (Claude Opus 5.5).
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T12:41:41Z.
@KainanP thanks, that ranking matches what we saw in game for #3343 (no frame change), and it tells me what to expect from #3035: its in-game A/B on our stack is queued for this afternoon (merged onto our lease-runs code, which needed one extra
OPENEDbump where a lease opens guarded pages without going throughopen(); otherwise a fault's unlocked read straddling a whole lease could be kept). I'll post the frame numbers here and on #3035.One data point on where the title's lock wait sits, from a critical-path read of our logs and code (no new runs): on our stack the title is at least a frame ahead of the GPU work (at each present, queue 0 still holds ~246 items that waited ~177 ms for the next frame's label values), so its ~84 ms waiting to write views and ~62 ms in the fault handler fall in time it would spend waiting anyway. The frame is the serial chain of our submissions (preparing + GPU + copy-back, ~198 ms), because 22 of ~24 submissions a frame complete before the next is prepared and the title's GPU-side waits are released only after the copy-back writes their labels. So the guard-lock wait you identify becomes frame time once that chain overlaps; we're working on that first, then the fault handler's
VirtualProtectunderGUARDSis the obvious next target.AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-27T13:06:25Z.
On the "Descriptor heap mirroring (384k slots), 18.1 ms,
HostHeap::sync_slots, none found" row: I wrote a bench in that shape and ran the open PRs through it. I also covered borosf's "heap slots the title copied" row (493,568 slots, 36.6 ms), which goes through the samemirror.Bench:
bench/sync-slots(f233390eon top off34bcfb8; cherry-pick both,#[ignore]d).sync_slots_bench: each frame, 192 random 64 KiB pages (393,216 slots) of a 2^20-slot placed view heap are written, with 0, ~9.5k or ~85k records changed, then onesync_heaps.copy_simple_bench: 393,216 slots a frame copied withcopy_simplein runs of 1-1024.cargo test -p victory-gpu --release sync_slots_bench -- --ignored --nocapture --test-threads=1.Where the time goes on
main(RTX 4060 Laptop):mirrorcosts ~1 µs. ~9.5k changed per frame gives 12-17 ms, close to the 18.1 ms row, so the row is most likelymirrorof changed slots, not the scan.copy_simpleof records the slots already hold costs 71 ns/slot here, the same as borosf's 74 ns/slot, because each slot takesSHADER_HEAPSand the slot locks on its own.PRs (interleaved against base
63bcca4; per-PR tables on each):No tree lost a view or left a slot stale (0 in all 56 runs).
What this suggests for the two rows:
mirrorper changed slot. Async_slots-only fix isn't clear from this data, so I'm not opening a PR for it.Earlier contention runs of #3356, #3512, #2848 and #2821 are in my previous comment.
AI use: Claude Code (Claude Opus 5.5).
Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-27T13:38:08Z.
This follows up my sync_slots bench above. I profiled where a changed slot's ~1 µs
mirrorgoes (main, RTX 4060 Laptop, ~9.5k changed of 393k):bindless::Viewed::set(the census) takes ~480-690 ns, about half. Most of it is the slotHashMap(~290 ns, it misses the cache at 600k-1M entries) and counting the old range out of theBTreeMaps.maketakes ~310 ns, of whichCreateShaderResourceViewis only ~100-140 ns.keep/retiretake ~100 ns, the locks plusview_at~60-100 ns, andprepare~50 ns.A host-descriptor cache wouldn't pay off here, since the driver call is ~10 % of the cost. #3522 makes the census cheaper instead:
My estimate is ~3-4 ms of the 18.1 ms row. @neonbyte1, an A/B of the heap sync on the world would settle it.
AI use: Claude Code (Claude Opus 5.5).
Imported from Marvisak/VIctory. Originally posted by shawshanker18 on 2026-11-27T14:21:46Z.
A row from the other end of the hardware range, in the same form: a laptop with little memory, Windows, D3D12 directly (no Wine).
Setup: RTX 4050 Laptop GPU (6 GB, driver 621.14), 16 GB RAM, Windows 11, Series X profile, 1920×1080. Build: the fxceless-based
fork-nv2branch (notmain+ the stack above),diagprofile with--features diagnostics. Env:VICTORY_INDIRECT_WINDOW=1 VICTORY_FETCH_COPY_QUEUE=1 VICTORY_CARD_REHASH_RUNS=1 VICTORY_ALIAS_ONCE=1 VICTORY_FAST_READ=1. Scene: first world scene after load, 56 world frames (≥500 draws) over one 10-minute run.Compared with the 5090 rows, the split flips: here the GPU is ~66 ms and the CPU side (preparing + copy-back) is ~270 ms at the median, so on a laptop CPU the copy-back and copy paths are most of the frame. Copy-back alone takes about twice as long here (96 ms) as on the 5090 (~50 ms) for a similar size (~60 MB).
Two other measurements from the same runs, in case they help rank PRs:
VICTORY_BVH_BUILDERunset), ~16 from a local NVIDIAVICTORY_SKIP_PIPELINESlist, ~6 compute pipelines the driver refused.settle_nowwait for the relay without holdinghost.submitteddid not change the median (2.5 fps both ways, two 10-minute runs), so on this machine the lock is not where the time goes; the copy paths are.No game data or shader hashes in this comment.
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T14:28:35Z.
@KainanP thanks, the bench settles which heap PRs to measure in the world: #3522, #3055 and #3265 are being built on our stack now and will get in-game A/Bs against adjacent controls (heap-sync time and the title-copy row first, frame second). Results here and on each PR.
@shawshanker18 useful row, and two things line up with ours:
BVH builder held back … made=53 refused=0); the drop line gives them no reason bucket, which is why they look anonymous. Only ~9 a frame are refused shaders.AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by JurajSimicevic on 2026-11-27T17:52:39Z.
Rows for RTX 5080, Windows 11, native D3D12, on a tree with #439 and #2121. On this card, #2958 takes the frame from 3.16 s to 1.74 s, and #3312 on top of it takes the frame to 0.53 s (1.9 fps). With both, the GPU time falls from 2.9 s to 150 ms, close to the other rows (66 ms on shawshanker18's RTX 4050 Laptop, 77 ms on neonbyte1's 5090).
Setup: RTX 5080, driver 617.42, Windows 11 26200.
main63bcca4+ #2098, #2626, #2464, #2118, #439 ate2d3cfdand #2121 at0bc5edb, plus #3415's dump diagnostics. Nothing else for performance.VICTORY_KEYS(Enter every 4 s up to 64 s), with no input after.VICTORY_GPU_TIMING=1withVICTORY_D3D12_DRED=1(the commands are only noted with DRED). They are medians over 30 reports, with every command kind, not the log's top 25 (a local change to the report).576188a)GPU side, timed, before #3312 (ms/frame, with commands/frame in brackets):
Unlike the Wine numbers, on this card nearly all of "on the GPU" was command time (lists 2,816 ms of wall time against 2,792 of commands). The command counts are close to the opening table's, but each class cost 15-70 times more here.
What this suggests:
main+ #2885, so how much it gains depends on the tree. Preparing rises by 20 ms (about 30 MB more title copies a frame) and copy-back by 16 ms. Details are on #3312.main+ #2885 with an RTX 5070 (590 → 491 and 613 → 566 ms).Not tested: more than one run per row, other scenes, a timed run with #3312.
Local diagnostics only. No game data: timings and counts.
AI-assisted.
Imported from Marvisak/VIctory. Originally posted by JurajSimicevic on 2026-11-27T18:08:42Z.
Follow-up to my RTX 5080 rows: the timed split with #3312. Same tree, scene and method. One run with
VICTORY_GPU_TIMING=1and DRED, medians over 30 reports after 5.5 minutes in the world (ms/frame, with commands/frame in brackets):What this shows:
Local diagnostics only. No game data: timings and counts.
AI-assisted.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-27T22:29:30Z.
@neonbyte1 for the
watch::GUARDSrow (the title's 52 ms a frame queueing in its write-fault handler): #3455'sVICTORY_PORT_GUARDwill not move it as the PR stands. Its fault handleron_writestill takesGUARDS.write(), and the one shared use needsVICTORY_PORT_JOURNALtoo. A local benchmark of concurrent write faults showed no difference between off and on (details and lines in #3455). The fork's port 6 that #3455 is ported from does take the lock shared in the faults (open_faulted), with a claim per block. That is the part that would remove this row.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T22:34:15Z.
@upipibi thanks, that's exactly the missing piece. You're right: on our stack the row is the exclusive
GUARDStake in the fault handler. Our own counters say the same thing: about 50-58 ms per frame in the handler and 71-79 ms of the title's threads waiting to write views.What we have measured against that row so far: #3035 (reading the saved bytes outside the lock) takes about 8 ms off the handler time and 7.5 ms off the frame on our stack. It doesn't change that every fault still waits for every other fault.
We're now building the shared-lock fault path on our stack, re-implemented from the design you describe in port 6 (gleaf-6/VIctory-7900XTX-
42ddb597: per-block state in atomics, a claim per block, only mapping changes, kernel writes and frees exclusive), behind a switch, with credit to that fork and to you. That includes concurrency tests (faults on distinct blocks, a fault racing a refresh, a fault racing a free) and your benchmark shape. The in-game A-B-A-B result will be posted here, against an adjacent control.AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T02:07:01Z.
For the copy-back row: #3570 measures a lever that no upstream PR has yet,
VICTORY_WC_NO_BACKfrom the AMD forks (#3570 lists Belobug#630 as related work; the code is in crossducking/RAZDA4A-XEN, branchdevf8bbae3,crates/victory-gpu/src/wc.rs, GPL-3). I read their code and the #3570 numbers; I ran nothing.What it does. XMem records the protection the title asks for (
xmem.rs:209→wc::title_memory_protection). Shader writes into memory the title asked for as write-combined (the console's0x400bit), which the console's CPU writes but does not read back, are not copied back into title memory. The range is marked as the card's instead (Shadow::card_owns).skip_back(wc.rs:113-133) does this only when all four hold:VICTORY_WC_NO_BACK_MIN_KB(64 by default);Anything else is copied back as before.
Measured in #3570:
VICTORY_WC_NO_BACK_MIN_KB=1024.VICTORY_WC_BAR=1variant from the same source ignores the minimum and breaks lighting.Upstream would need the XMem protection hook, a copy in video memory (close to what #3312 provides), and the write-watch condition. There are no NVIDIA numbers yet.
AI-assisted (Claude Code, Claude Opus 5.5 read the fork's source and #3570).
Imported from Marvisak/VIctory. Originally posted by reallyvibe on 2026-11-28T11:07:14Z.
@neonbyte1 a coordination question on the
watch::GUARDSfault-handler row.#3035 (reading the saved bytes outside the guard lock) was closed by its author on 28 Nov without a comment. You measured it at 196.1 → 188.6 ms per frame, with the handler down from ~58 to 50 ms.
Before we do anything: would reviving it complement your shared-lock fault path or duplicate it?
OPENEDbump you needed where your lease code opens guarded pages without going throughopen()?If reviving it would get in your way, we can instead run your branch's concurrency tests on native Windows once it's up: faults on distinct blocks, a fault racing a refresh, a fault racing a free. We'd also run KainanP's
guard_contentionbenchmark there. Your numbers so far are Linux/Wine. Our machine is an RTX 4050 Laptop and a Ryzen 7 7445HS on Windows 11. These runs would be CPU-only and synthetic, with no game.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-28T11:11:19Z.
@farhankhan8571811-star reviving #3035 wouldn't get in our way; it complements what we planned. Answers:
OPENEDbump isn't needed on upstream. It's only needed where our lease code opens guarded pages without going throughopen(), and that code is in my #3677, not upstream. If #3677 lands, I'll add the bump there. #3035 can stay as its author wrote it.guard_contentionon native Windows would be valuable once a shared-path branch exists. I'll tag you when it's up rather than ask you to wait on it now.AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-28T19:29:45Z.
Frame budget update, 2026-11-28 (RTX 5090, Linux, Wine 11.22 + vkd3d-proton, Series X profile, 2560×1440, ray tracing on, prison yard; 420 s runs after a warm-up, medians of the last 30 frame lines, adjacent A-B-A-B unless noted). The tree is our integration of upstream main
63bcca43cplus ~500 open PRs (neonbyte1/VIctorymain), so absolute numbers aren't upstream's.Where a frame goes (one serial chain under the submission lock, ~207 ms):
GPU work itself is ~58 ms: 924 indirect dispatches (19 ms) plus their argument clamps (9 ms) are ~46 % of it. Off the chain (on title threads with slack): ~85 ms in the guard fault handler, ~80 ms of title threads waiting to write views, 22 ms of draws waiting for pipelines (a first-use burst, 0 in steady state).
Measured today:
DISPATCHsignatureCorrections to my earlier posts here: the "shared-lock fault path" I said we were building was never built (corrected on 28 Nov in reply to farhankhan). #3035's revival is now #3754.
What's next on our side: narrower declared write ranges for the page-table programs, earlier labels (the title's next submission starts only after the previous one's labels are written), and #3265's batched descriptor copies, whose in-game A/B I promised here and haven't run yet. It's on tomorrow's queue.
AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by reallyvibe on 2026-11-28T21:48:04Z.
@neonbyte1's split between the serial chain and off-chain time (7244586999) and the
Movesrow in @borosf's native table (7217271641) made me check whatmovescounts at main63bcca43, and measure the copy itself (synthetic, native Windows). None of it shows what produced FIND-30's figure; the in-game parts are hypotheses until checked on a run.What
movescovers.movesisC::MoveUs, added around the firstread()incopy_mapped. Its callers are copy steps andBatch::flush's shadow refreshes (serial), and texture refreshes on up to 4 threads throughin_parallel. All of it runs insideexecuteunder the submission lock, but the counter is one atomic, so for the texture path it is summed worker time, not elapsed critical-path time.The frame line's
textures … msis summed likewise (texture.rs#L544-L551). That phase's elapsed time is "heap texture uploads" (host.rs#L1205-L1209). Somovescan't go into a chain budget as it stands.No byte counter shares its scope:
copies … MBis serial only,textures … MBparallel only,title copiescopy steps only, andrefreshes … MBrequested bytes, as borosf noted. The windows differ too: frame-line values are reset every second but printed every five (host.rs#L3049-L3070), while copystat covers all five seconds (host.rs#L3124).So "MB per
movesms" is an apparent rate from counters that may describe different copies: both the ≈1.75 GB/s implied by FIND-30's "205 MB … 117 ms" (pes7) and the ≈9 GB/s I get from "copies 480 MB" and "moves (about 52 ms)" in zed6000's native #400 run. Neither is a measured copy throughput.Within one window the parallel share of
movescan't exceedtextures … ms: 9.8 of 24.72 ms in borosf's run. That gives an indicative estimate of roughly 10 ms or less from summing there, not a rigorous bound, as the two figures come from different lines and windows.The copy itself, native Windows (synthetic). A standalone C benchmark makes
host::read's in-processReadProcessMemorycall on memory allocated as main does (plain, write-watch,SEC_RESERVEplaceholder views; the D3D12shared_bufferheap as destination). 1,088 fresh-process runs, all copies verified; medians, GB/s = 10^9 B/s:shared_buffer/ 64 KiB views →shared_bufferin_parallel, title-like background load: elapsed / by summed call timeMemory type matters little, per-call cost steps up at 512 bytes, and with four copiers on this bandwidth-limited laptop summed call time reads ~4× below elapsed throughput (background load detailed in the repo).
RPM vs memcpy on trimmed pages. With the working set emptied before every pass (~131k soft faults per 256 MiB pass, no hard faults), RPM ran at 2.95 GB/s and memcpy at 1.48 GB/s. Net of each configuration's warm pass time, that is roughly 0.42 vs 1.2 µs extra per fault, which could matter for user-mode copies (#2349) under memory pressure.
It covers only soft faults on the copied pages, 1 MiB calls, a full trim each pass and vcruntime's
memcpy(not #2349's routine). Native runs do fault while preparing (15,326 a frame in borosf's run), but nothing shows they hit copy pages, so this is not evidence of an in-game regression. It doesn't apply under Wine, where the current-processNtReadVirtualMemoryis amemmove(desplmfao).Limits:
in_parallelwould pick 3 here;moves'sas_micros()truncation not modelled.To settle it on a native diagnostics run:
copies … msplus "heap texture uploads", somovesabove that would be summed worker time. That only holds when the counters cover compatible windows and scopes: today, a steady scene.copy_mapped, beside @Jackster'sQueryUsattribution (#3429): bytes passed toread(), andMoveUssplit by submitting thread vs workers.Source, configurations, raw results and a script recomputing every figure here:
github.com/reallyvibe/victory-kcopy-bench@b58af47b79. No game data used.AI-assisted (Claude Code): it wrote and ran the benchmark and drafted this comment; all runs were on my machine.
Imported from Marvisak/VIctory. Originally posted by zed6000 on 2026-11-29T17:41:53Z.
The heap-sync PRs on an RX 7900 XTX (native Windows, AMD driver 32.0.32029.2010, Ryzen 9 7900X3D), measured on the neonbyte1/VIctory integration tree
8d9b82fd9(neonbyte1/VIctory#64). In the prison yard this box spends 54-57 ms a frame inheap slots the title copied, against the 5090 box's 17 ms (about 35,000 slots made a frame against 15,000), and its title threads wait 254-274 ms on the heaps' lock.descriptor/host.rsandshadow.rsagainst that tree, so it needs a port too.AI-assisted (Claude), posted for zed6000; counts and times from VIctory's own report lines; no game data shared.