Repository navigation
Conversation
…(VICTORY_COPY_PLAIN=1)
… VICTORY_COPY_PLAIN=1, -20 ms copy-back)
|
Tested on an RTX 4080 (Windows 11, D3D12, Ryzen 9 9900X), on a branch that is fork main
So about 11% on the frame here, two runs each. AI-assisted (Claude Code ran the measurements and wrote this up). |
|
Tried this on Windows, RTX 5080, on top of ca8829f with COPY_PLAIN=1, RELAY=2, QUEUE2=1, ASYNC_SUBMIT=1 (no JOIN_PARTS / BACK_OWN_VIEW). The new counter stayed at "writes back in place: 0, 0.0 MB, 0.0 fell back" for the whole run and frame time was the same as without it (~122 ms median at world+800). Looks like with these switches the copy-back never reaches write_mapped, it goes through the exact merge in copy_back_with instead. So no gain here, but no harm either, picture unchanged. |
|
Tested in-game on Windows 10 Pro (22H2), Intel i5-13600K (6P+8E), RTX 4080 16 GB (driver 621.01, Series X profile), 420 s run in the prison cell scene (ca8829f + #1014 + #1015 + #1016 + #1029 + #1032 stacked, compared against our 600 s 465b94f run with the same base switches VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_COPY_PLAIN=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_JOIN_PARTS=1 VICTORY_BACK_OWN_VIEW=1 VICTORY_INDIRECT_GATHER=1 plus VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_GROUP_SYNC=2 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024). Windows 10 RTX 4080 measurement with VICTORY_COPY_PLAIN=1 (VICTORY_WRITE_PLAIN default on):
|
|
Thanks for testing on Windows everyone! Good to see 0 fallbacks across all three setups — and interesting how much bigger the win is under Wine (~20 ms) and on Xeltax's setup (~11%) compared to Win10 @Ym1r1710 curious why you got 0 there — both |
|
Found it, my fault for not saying. My tree also has the #690 exact copy-back on top (VICTORY_EXACT_BACK, on by default there), and with that every merge path returns through putback before it gets to write_mapped. So on plain main it should behave like your runs. I'll try it again without #690 when I get a chance. |
|
Linux/Proton validation of an adapted d919676 on CachyOS / Ryzen 7 9800X3D / RTX 5090 / NVIDIA 620.73.04 / GE-Proton 11-14. Local adaptations keep writes explicitly opt-in (both COPY_PLAIN=1 and WRITE_PLAIN=1), handle both source and destination faults, and exercise complete-range fallback after partial copies/remaps. Relevant tests pass in the GPU suite (211 passed, 4 existing runtime failures, 8 ignored). A synthetic Windows debug-profile test under Proton compares the production helper with NtWriteVirtualMemory: 64 KiB copies, 12 ABBA cycles, 24 samples/path, same stable VirtualAlloc mappings, canaries/readback outside timing. Median guarded/kernel time: hot 64 KiB 553/14,464 ns (26.1x); rotating 16 MiB 2,258/22,972 ns (10.2x). These are cached CPU-copy measurements, not FPS gains or section-view/remap atomicity proof. The benchmark is retained as an ignored test. The guarded-copy title trial actually exercised write_mapped, with zero reported write fallbacks across its telemetry, normal incomplete visuals and no Xid. It ended after 421.64 s at the same existing title assertion. Scene/cache differences prevent a causal FPS comparison; recent combined trials did show occasional guarded-write fallbacks. Writes remain default-off here. Source, benchmark and limits: https://github.com/ThomasHFWright/LinVictory/blob/linux-edge/docs/linux-improvements.md |
|
I tested this PR’s In the first common 34-second interval after the heavy scene started, there were two host reports per run with at least 1 MB/frame copied back. The median of their copy-back time per MB was 74.46 ms/MB with guarded writes off and 21.49 ms/MB with guarded writes on. The enabled run reported 450–608 direct writes per frame, 15.8–20.2 MB per frame, and 0.0 fallbacks in the qualifying direct-write reports. Draw and copy volumes differed between the runs, so these samples are too small for a sustained performance estimate. The enabled run hit the title’s known watchdog. The guest deliberately writes to address zero at that site after the main thread stops advancing. Both runs used the default watchdog behavior. Earlier FX and KLBF builds hit the same site before this PR. Watchdog report · Watchdog implementation The disabled run reached the 420-second timeout. The kernel reported no GPU reset. All five Tested-on: RX 6800, Xeon E5-2670 v3, Fedora Linux 45 Silverblue, Wine and RADV 26.2.5 in the Victory Flatpak. |
…alks in warm()
|
I tested With both Codex assisted with the integration and tests. |
When
VICTORY_COPY_PLAIN=1is on, reads from title memory already run in place viavictory_copy_guarded, butwrite_mappedwas still sending every shader-written copy-back chunk throughNtWriteVirtualMemoryeven thoughwatch::writingjust opened the guards right before it.What changed
victory_write_guardedtwin inplaincopy.rs(rep movsbwith WRITE-fault handling in the existing vectored exception handler).host::write_mappedtriesplaincopy::writefirst whenVICTORY_COPY_PLAIN=1(opt-out withVICTORY_WRITE_PLAIN=0) and falls back to the existingNtWriteVirtualMemory/ per-page path if any destination page is unmapped or read-only.plaincopyframe line and a unit test (a_readonly_or_unmapped_destination_ends_the_write_without_a_fault) covering writable, uncommitted, and read-only pages.Tested
VICTORY_LATE_WAIT=3,VICTORY_COPY_PLAIN=1,VICTORY_QUEUE2=1,VICTORY_ASYNC_SUBMIT=1,VICTORY_JOIN_PARTS=1,VICTORY_BACK_OWN_VIEW=1).4,250–4,740writes/frame (61–64 MB/frame) completed in place with0.0fallbacks.49.4 msto29.6 ms(~20 ms/frame saved); overall frame time moved from202–207 ms(4.9–5.0 fps) to184–186 ms(5.4 fps) with zero visual regressions or faults.plaincopy::tests(5/5) pass under Wine on465b94f.