Repository navigation
Card copies' pieces come down inside their own flights: relay fetch wait 139 ? 0 ms/frame (VICTORY_CARD_FETCH_INFLIGHT=1, off by default) - #648
Conversation
…FETCH_INFLIGHT=1, off by default) With the relay, the thread that lands flights fetched the 64 KiB pieces a flight's compare flagged with a list of its own on the host's queue, the queue the submitting thread keeps filling: each fetch ran behind every flight sent meanwhile, and the landing waited for all of them. With the switch the compare's own list does the fetch. Right behind the compare (a UAV barrier between) a small shader, CARD_FETCH, takes a ticket for each flagged piece and copies the piece, cut as the compare hashes it, into slot `ticket % slots` of a buffer in the PC's memory. When the flight's fence is reached its bytes are already there, and the landing merges them (card_merge_relay) with no list, signal or wait of its own. VICTORY_CARD_FETCH_INFLIGHT_MB (64) sizes the slots: one per 64 KiB, rounded down to a power of two (1,024). A landing that cannot take every piece from slots (a flight's pieces overflowed them, or a range was not compared) fetches the old way, as without the switch. Measured on an RTX 3070 Laptop (8 GB), Series S, VICTORY_WINDOW_KB=1024 VICTORY_WINDOW_TAILS=1 VICTORY_INPLACE=1, the same diagnostics build, the world standing, about 45 samples each: - off: 353 ms a frame; the relay waited 138.7 ms a frame for fetches; copying back 236.5 ms; - on: 305 ms a frame; no wait for fetches; copying back 112 ms; 71 to 79 pieces (3.4 to 3.9 MB) a frame merged from slots; no landing went the old way, no overflow. (Those runs were made before the last fix below; with no old-way landing in them, what it fixes did not come up.) What keeps the merge exact: - "Fetched after" is the flight's own send number. The queue's count is raised only where a submission's changed ranges are taken, under the submission lock, and that lock is held until the submission's lists and its compare's list are on the queue: when the compare's list ran, the card had received exactly the sends up to the flight's own. - Send notes. An old-way fetch took the queue's count when it was sent and then let the notes of sends up to it go. A flight still in the air, sent before that fetch, merges its slot as of its own send, and needs the notes of the sends between: without them a title byte that went up in a later send is taken for a shader's write and put back to the card's older byte. With the switch an old-way fetch lets notes go only up to the landed flights' own send (fallback_fetched_mark). - What an old-way fetch brought is newer than the slots of flights that were on the queue ahead of it: those byte ranges are left out of their slots, and the rest of their slots is merged. - Tickets: the counter is 32-bit and never reset. A ticket gets a slot only within `slots` of the lowest ticket still in the air, which the landing raises in wrapping order; with a power of two of slots `ticket % slots` runs on across the wrap. Logging: a line per frame with the switch on (pieces and MB merged from slots, landings that fetched the old way, of them those that overflowed); the relay line's wait for fetches keeps counting only old-way fetches. Tests: the shader on the software adapter (slots, tickets, overflow, the 16-byte widening of pieces); a mixed landing on a real card copy (a title byte sent after a flight survives that flight's slot, and is lost with the old mark); tickets drawn and landed through the counter's wrap; the slot arithmetic against the merge's cut of pieces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent authored check of exact A second fixture separated the real queue calls at For one changed 64 KiB piece, same-binary off/on on the RTX (8 order-balanced fresh-process pairs, 16 steady flights each), median of process medians in µs: host prepare+submit 46.850→52.625, producing fence wait 253.950→264.700, landing 71.275→6.250; landing was faster in all 8 pairs. These are serial owned-flight measurements, not world FPS or a Series X result. No title files, screenshots, or shader inputs attached. |
|
Tested this PR ( 1. Under Wine the path does not start. 2. With that fix it works but costs card time here. There are 0 fallbacks and 0 ms of fetch wait. But this setup flags about 1,280 pieces (79 MB) per frame, not about 60:
The slot buffer size does not matter, so the cost is per piece, not a lack of slots. My guess from the code is that For comparison, I wrote a local variant with the same idea. It keeps the per-flight counter in device-local memory, writes only the slot index into the existing Measured and written with AI assistance (Claude Code, Claude Opus 5.5). |
|
Correction to my comment above. Two of its points did not hold up on repeat runs:
The Wine compile point ( AI-assisted (Claude Code, Claude Opus 5.5). |
|
Native Windows RTX 5070, Series X, testing the 64 MiB default at higher changed-piece volume. On this machine in-flight fetches removed the relay wait but slowed the checkpoint from 4.72 to 1.74 FPS. Both arms used the same diagnostic binary built from
The on arm merged a median 1,139 pieces (70.4 MiB) per frame from slots. Both fallback landings and slot overflows had a median of zero. The last 92 frames independently gave 4.68 vs 1.74 FPS within the same two runs. Camera landmarks matched; exposure and some surfaces differed. The counters span separate threads and overlap. This reproduces the high-volume slowdown on native D3D12 as well as the Proton result above. It does not isolate its hardware cause. WARP passed the new slot, skew/padding, overflow/wrap and late title-write tests in both modes. The full GPU unit suite had one depth-bounds assertion reproduce unchanged on the parent executable with the same DXIL environment. AI-assisted measurement and write-up. |
|
Series X mode on an RTX 3070 8 GB: the frame got about three times longer ca2513c picked cleanly onto our tree (one log-line conflict in
One run each, so the size of the effect is soft; the direction was not subtle. Not tried: a larger Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series X mode, 1920x1080, relay at its default (stage 2), card buffers 1 / 1024 MB, a diagnostics build. |
|
Currently working in a fix for the Series X, i'll keep you updated to do some tests, thanks everyone |
|
Data point from an RTX 5090 (driver 621.24, Windows 11 10.0.26300), and it is not a slowdown: with the switch the title never leaves the guest profile selector. The 13-draw plateau is the guest dashboard profile card, so the title is not even loading. Nothing about card fetches shows in the log at that point, which fits the switch being applied but the boot path depending on something the in-flight path does not deliver. Matches the direction of the reports above (4.72 → 1.74 fps on a 5070, 3x frame on a 3070 8 GB): on this box it is not a regression in speed but a boot hang, so I would keep it off by default. Happy to run a build with a fix when there is one. No game data involved; counts only. |
|
RTX 5080 (driver 621.24), Ryzen 7 5700X3D, Windows 11: a loss on this PC.
AI-assisted (Claude Code). |
|
Thanks @yualk, @ryotdev, @oeirughrepuiohg, @CuteBooty and @dcastell1 for testing and for the numbers. They pointed straight at the problem. What's going on: two scenarios, Series S vs Series X The amount of card-copy data that has to come back each frame depends on the console mode:
Why 70 MB hurts this much: effective bandwidth, not raw PCIe 70 MB at 12–15 GB/s would be ~5 ms. The cost comes from how it's moved: this version has the shader write every flagged piece straight into CPU-visible memory as thousands of scattered 16-byte stores. The effective bandwidth of that pattern is a small fraction of the bus. At Series S volume it doesn't show; at twice the volume it dominates the frame. (Before this PR the problem was the opposite: the old fetch only brought ~3 MB, but waited ~140 ms because it was queued behind newer submissions.) What I'm working on A revision that stages the pieces in VRAM from the shader and brings each flight's pieces down with one DMA copy on a copy queue of its own, so they don't queue behind newer work. The old fetch stays only as a per-piece fallback, with no artificial cap. It's written and the transfer numbers look right in Series S (~34 MB in ~9 ms of copy-queue wait). I'm still chasing an image issue with it, so I won't push it until that's fixed. I'll ping here when it's ready to test. Our Series S test setup, for reference
When testing, please include
@dcastell1: |
|
Series S data point on a desktop RTX 3070 8 GB (driver 610.88, Ryzen 7 5700X3D, 16 GB, Windows 11): a clear win here, which matches your Series S / Series X split. Setup:
AI-assisted (Claude Code); runs on my machine with my own copy, counts and timings only. |
…th one copy per flight Reviewers measured the first version slowing high-volume scenes (Series X: 1,100-1,450 flagged pieces, 70-90 MB a frame; RTX 5070 4.72 -> 1.74 fps, RTX 3070 321 -> 1,093 ms a frame, Proton 6.3 -> 3.1 fps). Raw PCIe bandwidth does not explain it (70 MB is ~5 ms at 12-15 GB/s): the cost was thousands of scattered shader stores straight into a CPU-visible write-back heap. Now CARD_FETCH runs in two stages behind a UAV barrier: tickets (one thread per compared piece; a flagged piece takes a ticket from its flight's counter) and copies (each ticketed piece is copied, widened to 16 bytes as the compare hashes it, into the flight's region of a device-local staging buffer). At landing the relay reads the flight's counter and issues exactly one CopyBufferRegion per flight for the slots it used, all flights of a landing in one list on a COPY queue of its own with one wait; that queue does not sit behind newer flights the way the old fetch did. Regions instead of the ticket ring: card_before reserves a contiguous region per flight (one slot per compared piece, at most a quarter of the staging buffer unless VICTORY_CARD_FETCH_INFLIGHT_MAX_KB says otherwise, so one flight comparing 1,024 pieces can't take the whole buffer and leave every other flight in the air to the old way), zeroes its counter, and gives it back after the merge. The 32-bit wrap handling goes away. Without a copy queue or memory to bring the slots down, a landing comes down the old way (said once in the log). Fallback is per piece: pieces past their region, of uncompared ranges, or of flights without a region come down the old way. Merge order is the correctness rule: all slot merges in line order (after = the plan's sent_as, minus what an old-way fetch brought), then one old-way fetch of the leftovers merged last. fallback_fetched_mark and the send-notes reasoning are unchanged. CARD_FETCH no longer uses groupshared memory or group barriers, and compiler errors are logged. Staging costs VICTORY_CARD_FETCH_INFLIGHT_MB of card memory (64 by default). Tests: warp_card_fetch_stages_flagged_pieces_and_they_come_down_the_same (WARP: compare, tickets, staging copies, one copy down; bytes match, 16-byte widening, a ticket beyond the region gets no slot), regions_in_the_air_never_share_a_slot, inflight_slots_are_one_per_64_kib; earlier merge/notes tests kept. cargo test --release -p victory-gpu: 124 passed, 0 failed, 2 ignored.
|
The DMA revision is pushed ( The shader now stages flagged pieces in VRAM, and at landing each flight's pieces come down with one DMA copy on a copy queue of its own. The old fetch stays only as a per-piece fallback for pieces that don't fit in their flight's region, with no artificial cap. The staging buffer is 64 MB of VRAM ( In Series S: ~550 pieces / ~34 MB a frame come down in ~8 ms of copy-queue wait, and the image is correct. (The bright flash early in the intro is the cutscene's own fade to white; it shows up with the switch off as well.) Most of all I need Series X numbers, since that's where the first version hurt. @ryotdev @CuteBooty @oeirughrepuiohg, when you can, please rerun with
Thanks! |
…c, draw-table slots left to their draws, no failing write-watch calls; card fetches inside their flights (off by default) - Descriptor sync: a multiply-and-fold fingerprint of a record in place of BLAKE3 (35 to 42 ms a frame over 250,000 to 300,000 records), and slots that draws read through tables lately are left to their draws (VICTORY_HEAP_SYNC_TABLES=1 mirrors them too): the pass over the heap went from 70-220 ms a frame to about 3. - Write watch: no kernel asking for memory the guards already hold as view memory (pull request #670 by Jonirulah). - Card copies' flagged pieces can come down inside their own flights (pull request #648 by Jonirulah; VICTORY_CARD_FETCH_INFLIGHT=1, off by default). One game run with it on: no device loss, the copy-back thread's fetch wait 181 -> 0 ms a frame, the card busier; no frame-time gain claimed. - Logging: the heap pass's texture part and buffer slots; indirect compute dispatches over 65,535 groups. - README: what was measured, and that pull request #220 with VICTORY_INDIRECT_WINDOW=1 lost the device twice here and is not in. One five-minute game run of this tree's source on an RTX 4070: no device loss; the frame is still 250 to 380 ms (the card is the limit). This merged tree was built; its test suites were not run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@../pr648-comment.md |
|
I tested the integrated switch on NVIDIA fork main Median reported card-copy fetch wait went from 136.25 ms to 0.00 ms per frame, while displayed application FPS fell from 3.56 to 2.53 and P99 frame time rose from 470.38 to 676.21 ms. Mean GPU busy per displayed frame rose from 202.79 to 333.06 ms. The enabled arm saw a median 73.1 MiB and 1,180 pieces per frame, with zero reported fallbacks or overflows across the 76 gameplay samples. An earlier cutscene interval logged both. Both runs accepted camera and movement input and neither logged device removal. This is one pair in fixed order. Full measurement and setup Separate DMA revision, Series X. I also ran the exact PR head Across 80 enabled gameplay reports, the median staging line was 800 pieces (49.66 MiB) merged, 50.02 MiB copied, 7.0 ms copy-queue wait, 362.5 pieces flagged beyond their flight's region, 3.0 legacy fetch landings per frame. The courtyard wire was visible in both. The enabled run showed wall gaps and long hair streaks in two stationary captures 24 s apart. It also showed sky through the ceiling in the matched post-retreat view, where the default run drew the ceiling. Both runs logged the same eight distinct pipeline refusals ( |
With in-flight card fetches enabled, the comparison and clamp shaders can reach FXC under Wine, where profiles with embedded root signatures fail to compile. Use the runtime compiler fallback for both shaders so the fetch setup can create its pipelines on Wine. Based-on: fxceless#648 Based-on: Marvisak/VIctory#178 Tested-on: AMD Radeon RX 6800, Fedora Linux 45 (Wine/vkd3d-proton) (156 focused tests and a title launch) Assisted-by: gpt-6.2-sol
|
We tested Jonirulah’s in-flight readback change on an RTX 4080 SUPER in the Series S prison courtyard. It made presentation faster in both run orders. The diamond-pattern wire across the courtyard opening appeared in both controls and disappeared in both enabled captures. We adapted commit
The pooled gain was 6.25%. The median reported wait on the legacy fetch path fell from 58.6 and 60.8 ms/frame to zero in the respective runs. The enabled path merged about 41 MB/frame. A separate check on the ordinary persistent profile also ran faster, from 5.3 to 5.7 FPS in the courtyard, but the wall blocks and the player’s sleeve lost detail. The indoor camera angles differed, which limits that comparison. We haven’t isolated the cause of the wire-pattern change. That courtyard opening would make a useful visual regression check alongside the fence and byte-copy tests. These measurements come from a Codex-assisted local port and test harness. Upstream change |
|
@Jonirulah, I tested the overflow path on 4d28486 with in-flight fetching on and a 1 MiB staging buffer. Two tracked flights write 17 and then 29 to the same pieces. I let both finish on DIRECT before landing the first. Four changed pieces returned four words of 17. With five, the first landing returned four words of 17 and one of 29. The second landing returned five words of 29. The same result repeated twice per adapter on WARP and an RTX 2060 SUPER. Is the overflow piece allowed to observe a later flight at this first landing? This may be worth specifying alongside the existing fallback tests. Test patch, control and readbacks. Prepared with the help of Codex 6.2 Astra Max. |
|
I tested the 4d28486 staging revision on main 9376fd6 on Windows 11 with an RTX 5070 Ti. Both Series X runs used the same executable and shader-cache seed. The only switch changed was VICTORY_CARD_FETCH_INFLIGHT_MB. Each sample covered 149 presents at the same 1080p gameplay view.
The readback metrics are medians of complete host reports. There was one run per capacity. The larger allocation reduced fallback substantially, with a smaller change in frame time. Both runs rendered the character, window mesh and yard. The 128 MiB captures lacked the left-wall block pattern visible in the 64 MiB run, which remains a scene-specific observation. AI-assisted testing. |
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
|
RTX 5090, Setup: Windows 11, RTX 5090, diagnostics build of
With the switch on, about 1,290 pieces (80 MB) a frame were merged from slots, with 0 landings the old way and 0 overflows at the default 64 MB. That is many more pieces than the laptop numbers in the description (62–79, 3–4 MB), and the 64 MB buffer still never overflowed. No crashes in either arm. On this card the fetch wait is gone and the relay thread is now mostly idle. The frame is still about the card's time plus the submitting thread's work: the settle on "title memory read" (mostly the per-frame fill of upload memory, #462's subject) and about 105 ms of preparing. |
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
|
Tested the new head ( Setup: RTX 4070 Ti, Linux, Proton Experimental with vkd3d-proton, Series X. Our tree is the fork at 2119b0e plus a few open pull requests, with this PR's two commits on top.
The line you asked for, from one of the on runs: The other on run reports 958 pieces (59.2 MB), 6.0 ms of copy-queue wait, and 2.7 landings fetched the old way. So at Series X volume (~950 pieces, ~59 MB a frame), this version no longer costs card time. GPU time goes down by about 10 ms, and the frame rate goes up about 6-9% where it used to halve. The leftover 15-21 ms of fetch wait probably comes from the ~3 landings a frame still fetched the old way, which may be the ones with pieces flagged beyond their flight's region (~240 a frame). I have not checked that. No device loss and no new errors in either on run. (These ran with Measured and written with AI assistance (Claude Code, Claude Opus 5.5). |
|
RTX 3070 8 GB, Series S, DMA revision: copy-back 102 -> 24 ms, but the frame did not get shorter Not the exact PR head: 4d28486 ported by hand onto our tree (which already had ca2513c), with one change of ours:
Staging line with
Both runs had Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series S mode (PR #188), 1920x1080, |
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
|
Same scene: the copy queue cut copy-back as far as the in-flight fetch did, without the extra time on the GPU Follow-up to my numbers above for 4d28486 (copy-back 102 -> 24 ms, on the GPU 77 -> 122 ms, frame not shorter). In
With the queue's re-fetch on, about 238 pieces a frame were fetched beside later submissions and about 10 of them Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series S mode (PR #188), 1920x1080, |
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
|
I compared the existing
The on run landed roughly 30–36 MiB per frame directly from the ring in the sampled scene. The diagnostics showed no ring overflows or old-way landings there. The compare-list time includes the GPU fetch when enabled. With the separate copy queue already in use, moving the fetch into the submission did not help frame time on this setup. This is a single pair, with a warmer cache on the second launch. AI-assisted with OpenAI Codex. |
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
The current comparison shader and indirect clamp already use the DXC fallback. In-flight card fetches still compile independently through FXC, so Wine can disable them when the compiler rejects their HLSL or omits the root signature. Use the same compiler for CARD_FETCH and exercise the resulting pipeline on the host adapter. Based-on: gmankab/fxceless-victory@f6e4e06 Based-on: fxceless/victory-fork#20 Based-on: fxceless/victory-fork#648 Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test) Assisted-by: gpt-6.2 sol xhigh
What it fixes: with the relay on, every landing that has flagged card-copy pieces sends one fetch list on the direct queue and waits on its fence. That queue is the one the submitting thread keeps filling, so the fetch runs behind every flight sent after it. On an 8 GB laptop card that wait was the single biggest cost in the frame: ~139 ms per frame to bring down about 3.4 MB, in about 5 waits of ~28 ms each.
What changes, with
VICTORY_CARD_FETCH_INFLIGHT=1:CARD_FETCH) runs in the flight's own compare list, afterCARD_COMPARE. It copies each piece flagged as differing into a slot of a CPU-visible buffer, taking a ticket per piece.card_merge_relay. There is no extraExecuteCommandLists, fence or wait.VICTORY_CARD_FETCH_INFLIGHT_MBsets the slot buffer size: 64 MB by default, which is 1,024 slots of 64 KiB, a power of two.Measured: RTX 3070 Laptop 8 GB, Ryzen 7 5800H, Windows 11, Series S. Diagnostics build, same binary and settings for every run, steady world (about 45-55 samples from 2 minutes after the world appears):
In both "on" runs, 62-79 pieces (3.2-3.9 MB) were merged from slots per frame, with 0 landings the old way and 0 overflows.
Correctness, reviewed twice by a second session:
sent_asas itsafter.QUEUE_ORDERonly rises under the submission lock, which is held until the compare list is on the queue.landable()lands flights in send order.relay_fetchedpast a flight still in the air (fallback_fetched_mark). Without that, a title write sent after a flight could be overwritten by that flight's older slot. The end-to-end testa_title_byte_sent_after_a_flight_survives_its_slotreproduces the bug with the old mark and passes with the fixed one, on a realShadowwith a card side, on WARP.Tests:
cargo test --release -p victory-gpugives 124 passed, 0 failed, 2 ignored (both already ignored upstream). New tests cover the GPU fetch on WARP (slots, tickets, overflow, padding), the slot math, the wrap, and the send-notes rule.cargo clippy -p victory-gpu --all-targetsshows no new warnings. Release and diag builds pass on310c6eb.Not tested: AMD and Intel cards, Series X, and Linux/Proton.
AI-assisted: Claude Code wrote and reviewed the change, and I ran the game for the A/B.