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
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!648
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-648"
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?
@Jonirulah on GitHub · 2026-11-25 03:59 UTC · original
Jonirulah:card-fetch-inflight→main· +1087 −7 · 3 files · 2 commits · openWhat 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.
@yualk on GitHub · 2026-11-25 04:56 UTC · original
Independent authored check of exact
ca2513c02bc: Windows MSVCdiag, RTX 5070 Ti (10de:2c05) and explicit WARP. No title run. With a 1 MiB slot cap (16 slots), a real 17-piece flight used legacy fallback; the next one-piece flight landed from a slot. Guarded guest words and untouched neighbors matched, and the producing fence alone did not publish guest bytes.A second fixture separated the real queue calls at
card_before/ submission. A overflowed; B used a slot; C's CPU upload was already queued but its GPU writer was not when A's fallback ran. B's uncovered word survived; C subsequently returned exact[3,4,2]on both adapters. Test-only widening of the fallback coverage from B's send through C's returned[3,2,2]instead. This exercises theafter - 1boundary rather than just the send-note retention helper.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.
@oeirughrepuiohg on GitHub · 2026-11-25 05:06 UTC · original
Tested this PR (
ca2513c0) on a heavier setup, at a much higher piece volume than the laptop numbers above. Setup: RTX 4070 Ti, Linux, Proton Experimental with vkd3d-proton, Series X files, relay stage 1, card buffers 1–1,024 MB, andVICTORY_INDIRECT_WINDOW=1.1. Under Wine the path does not start.
make_card_inflightcompilesCARD_FETCHwithD3DCompiledirectly, and Wine's compiler refuses it. The log saysno fetch inside flights (VICTORY_CARD_FETCH_INFLIGHT=1): pieces are fetched the old way error=Call failed. (0x80004005)and every landing falls back. Compiling it throughcrate::dxc::compile(CARD_FETCH, "main", "cs_5_1"), like the other run-time HLSL, fixes it. The shader and root signature then compile and run.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
tableis ashared_buffer(CPU-mapped). Every compared piece's group then does aStorethere, and every flagged piece does anInterlockedAddthere, so all of it crosses PCIe. That is about 16,700 stores and 1,280 atomics a frame here. #220 found the same with the indirect budget word.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
differsdword (no separate table), and reserves slots per flight from a ring. On the same setup it measured 6.91 fps / p50 142 ms against 6.30 off, with GPU time about 22–38 ms, relay fetch wait 56 → 15 ms, and about 20% of pieces still fetched where a flight's share ran out. So moving the counter and table off the CPU-mapped buffer is probably the main lever for high-volume scenes. I'm happy to run a revision here.Measured and written with AI assistance (Claude Code, Claude Opus 5.5).
@oeirughrepuiohg on GitHub · 2026-11-25 05:21 UTC · original
Correction to my comment above. Two of its points did not hold up on repeat runs:
The Wine compile point (
D3DCompile→crate::dxc::compile) still stands. Practical upshot for high-volume scenes: a per-flight cap that leaves the biggest flights to the old fetch avoids the card-time cliff. Why inline copies of about 80 MB a frame cost about 160 ms of card time is still open (GPU writes into CPU-visible memory under vkd3d-proton on NVIDIA?). Sorry for the noise.AI-assisted (Claude Code, Claude Opus 5.5).
@ryotdev on GitHub · 2026-11-25 05:39 UTC · original
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
ca2513c0with the same experimental sparse BC1 texture change, same saved checkpoint and separate copies of the same warm cache. The only switch changed wasVICTORY_CARD_FETCH_INFLIGHT. Both reached 320 frames beyond the first world marker. These are the last 140 frames of one run per setting, off first.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.
@CuteBooty on GitHub · 2026-11-25 05:55 UTC · original
Series X mode on an RTX 3070 8 GB: the frame got about three times longer
ca2513c0picked cleanly onto our tree (one log-line conflict inlate_line). One run with the switch against onewithout, same exe otherwise,
VICTORY_TEXTURE_DROP_MIPS=1in both:a frame "fetched the old way ... because a flight's pieces overflowed the slots". So the fallback path does run
in a game at this load.
One run each, so the size of the effect is soft; the direction was not subtle. Not tried: a larger
VICTORY_CARD_FETCH_INFLIGHT_MB, Series S mode.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.
@Jonirulah on GitHub · 2026-11-25 06:04 UTC · original
Currently working in a fix for the Series X, i'll keep you updated to do some tests, thanks everyone
@dcastell1 on GitHub · 2026-11-25 06:11 UTC · original
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.
@Peppacodes on GitHub · 2026-11-25 06:19 UTC · original
RTX 5080 (driver 621.24), Ryzen 7 5700X3D, Windows 11: a loss on this PC.
diagbuild with diagnostics: fork main310c6eb+ #220 + #462 + #144 + #670 + this PR (ca2513c), plus #28's watchdog hook and 64 MB pipeline-worker stacks.VICTORY_INDIRECT_WINDOW=1. One binary, a fresh copy of the same save per run, standing in the first room. Median of the last 20 frame lines, 5 min after entering the world.VICTORY_CARD_FETCH_INFLIGHTAI-assisted (Claude Code).
@Jonirulah on GitHub · 2026-11-25 06:49 UTC · original
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
card copies' pieces fetched inside their flights per frame ...from the log.@dcastell1:
310c6ebdoesn't contain this feature yet; it first appears inca2513c, the head of this PR. So in your runsVICTORY_CARD_FETCH_INFLIGHT=1had no effect, and the boot hang comes from something else in that setup. If you can, buildca2513cand toggle only that switch.@VibeClauding on GitHub · 2026-11-25 07:12 UTC · original
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:
diagbuild of fork main8dd30abwith #220, this PR (ca2513c), #670, #705 and #346 merged on top, plus my shader branch (VibeClauding/victory-fork@nvidia-8gb-fixes).--console series-s, warm shader and pipeline caches.VICTORY_RELAY=2 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024 VICTORY_INDIRECT_WINDOW=1 VICTORY_BAKE_TEXTURES_MS=0(see #594).VICTORY_CARD_FETCH_INFLIGHTVICTORY_BAKE_TEXTURES_MS=0the same stack ran at 3.7 fps with the switch on (run 49), because of #594. That run tells nothing about this PR.AI-assisted (Claude Code); runs on my machine with my own copy, counts and timings only.
@Jonirulah on GitHub · 2026-11-25 07:22 UTC · original
The DMA revision is pushed (
4d28486).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 (
VICTORY_CARD_FETCH_INFLIGHT_MB).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
VICTORY_CARD_FETCH_INFLIGHT=1and post:card copies' pieces staged inside their flights per frame ...(it shows how many pieces fell back to the old way).Thanks!
@yualk on GitHub · 2026-11-25 07:54 UTC · original
@../pr648-comment.md
@AaronMacArthur on GitHub · 2026-11-25 08:49 UTC · original
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
ca2513c02bc0309fc661b9d7b9fd55e04c1722bbto a local guarded build. For each seeded run we used the same executable, save, starting caches, relay setting of 2 and GPU buffer settings of 1 / 1,024 MiB. We toggledVICTORY_CARD_FETCH_INFLIGHTand held the camera stationary. Each row uses two 64-interval presentation windows per setting, starting 108 and 239 frames after the same courtyard shader marker.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
@iGoldenNinja on GitHub · 2026-11-25 08:16 UTC · original · edited 2026-11-25 09:01 UTC
I tested the integrated switch on NVIDIA fork main
9376fd60c0ba0e76a74c39b49b1407dbac0a64c7on an RTX 5080 16 GB, driver 617.14, Windows 11 Pro 25H2 (26200.9974). Both arms used the same diagnostics executable, copies of the same warm caches and a 90-second replay in the first controllable prison room. I ran the default arm first, thenVICTORY_CARD_FETCH_INFLIGHT=1.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
4d28486528d239800a79766ee6c2f9f348dca4b5on the same RTX 5080, driver 617.14 and Windows 11 Pro 25H2 build 26200.9974. One 90-second run per setting, default first, with matching inputs and cache seeds. Both reached controllable prison. Default displayed 3.87 FPS / 423.36 ms P99 and DMA staging displayed 4.12 FPS / 464.50 ms P99. Legacy fetch wait fell from 139.10 to 46.75 ms per frame.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 (
E_INVALIDARG) and no device removal. Exact DMA revision and full numbers@Pin0d1 on GitHub · 2026-11-25 09:03 UTC · original · edited 2026-11-25 09:06 UTC
@Jonirulah, I tested the overflow path on
4d28486with 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.
@SkillIssueXO on GitHub · 2026-11-25 10:57 UTC · original
I tested the
4d28486staging revision on main9376fd6on 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.
@JRamos1993 on GitHub · 2026-11-25 12:40 UTC · original
RTX 5090,
main9376fd6:VICTORY_CARD_FETCH_INFLIGHT=1takes the relay's fetch wait from about 155 ms a frame to 0, but the settled frame stays about the same (median 270 ms off, 273 and 283 ms on).Setup: Windows 11, RTX 5090, diagnostics build of
9376fd6, Series X files, warm shader cache, network off. Same exe, same save and same scripted keys for every run, 420 s each. Off and on runs were interleaved. Medians of the frame lines from 150 s after the first frame line with 500+ draws, about 30 lines (170–195 s) a run.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.
@oeirughrepuiohg on GitHub · 2026-11-25 13:28 UTC · original
Tested the new head (
4d28486, pieces staged on the card and brought down with one copy per flight) on Series X, the setup where the first version (ca2513c) cost us half the frame rate.Setup: RTX 4070 Ti, Linux, Proton Experimental with vkd3d-proton, Series X. Our tree is the fork at
2119b0eplus a few open pull requests, with this PR's two commits on top.CARD_FETCHis compiled through DXC (Wine's system compiler refuses it). Relay stage 1,VICTORY_INDIRECT_WINDOW=1,VICTORY_BAKE_TEXTURES_MS=0, card buffers at their defaults (1 MiB / 1024 MB). Same exe for every run, first gameplay room, 5 minutes per run after the world appears, warm caches. Off and on runs were interleaved (on, off, on, off).VICTORY_CARD_FETCH_INFLIGHT=1(2 runs)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
VICTORY_INDIRECT_WINDOW=1, which the fork README says not to combine with this switch; two runs were fine here.)Measured and written with AI assistance (Claude Code, Claude Opus 5.5).
@CuteBooty on GitHub · 2026-11-25 14:26 UTC · original
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:
4d28486ported by hand onto our tree (which already hadca2513c0), with one change of ours:a flight that might spill lands before the submission lock is released. One binary, one switch changed, the same
save and scene (open water in the first boat mission, 3,600-3,900 draws), one run each of 7 and 4 minutes:
VICTORY_CARD_FETCH_INFLIGHTunset=1Staging line with
=1:514.5 pieces (31.67 MB) merged from their slots, which came down (32.15 MB) in 4.8 ms of waiting on a copy queue; 0.0 pieces flagged beyond their flight's region; 0.0 landings fetched pieces the old way.in both runs.
no shorter. That differs from VibeClauding's Series S result on the same card with a faster CPU (5700X3D); here
the submitting thread on a Ryzen 5 3600 seems to be the limit either way (a guess).
ca2513c0) in an earlier build this morning, same scene: copy-back 23 ms, frame 225 ms.Both runs had
VICTORY_BAKE_TEXTURES_MS=0. One run each, and run-to-run spread on this PC is large, so read it as"copy-back clearly down, frame about the same".
Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series S mode (PR #188), 1920x1080,
VICTORY_TEXTURE_DROP_MIPS=1, relay at its default, a diagnostics build of a tree at main310c6eb6with a number of open PRs picked.@CuteBooty on GitHub · 2026-11-25 17:52 UTC · original
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). Inthe same scene, with relay fetches on a copy queue of their own instead (PR #665's queue with fork main's re-fetch):
4d28486port)With the queue's re-fetch on, about 238 pieces a frame were fetched beside later submissions and about 10 of them
fetched again. Different builds for the middle column and the other two, one run each. On this CPU the queue is the
one that shortened the frame.
Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series S mode (PR #188), 1920x1080,
VICTORY_TEXTURE_DROP_MIPS=1, relay at its default, a diagnostics build of a tree at main310c6eb6with a number of open PRs picked. One run per configuration unless said; run-to-run spread here is 5-10 ms.@alpz1000 on GitHub · 2026-11-26 04:25 UTC · original
I compared the existing
VICTORY_CARD_FETCH_INFLIGHTswitch on an RTX 3060 12 GB (610.88), i5-8400, 32 GB, Windows 11. Both runs used the same diagnostics binary based on988aa41, Series S profile,VICTORY_QUEUE2=1, and the same starting checkpoint. The on run used a 128 MiB fetch ring. I kept reporting windows from 365 to 500 seconds with 4,250–4,750 draws/frame and less than 1 ms recorded pipeline wait. One launch per setting.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.
@slauko on GitHub · 2026-11-26 08:20 UTC · original
A Wine finding before this reaches more trees: the fetch's shader compiles with the system's compiler, so under Wine there is no fetch inside flights at all — the switch reads as on and every landing goes the old way.
make_card_inflight(crates/victory-gpu/src/host.rs) is the only runtime shader left onD3DCompile. Wine's built-ind3dcompiler_47refuses these programs (the compare, the merge on the card, the ambient light and the Series S interface plane all needed the layer's compile for the same reason), and the run says so once:Measured on an RTX 3080 Ti under Wine (vkd3d-proton
ec20719, uiliannn's line, the cell at about 5,000 draws a frame), withVICTORY_CARD_FETCH_INFLIGHT=1andVICTORY_CARD_FETCH_INFLIGHT_MB=128:card copies' pieces fetched inside their flights per frame: 0.0 pieces (0.00 MB) merged with no fetch of their own; 7.0 landings fetched the old way;copying backstands at 199 to 215 ms of a 275 to 289 ms frame for ~80 MB — longer than the card's own 122 to 163 ms, so the back-copy is the frame's limit here.Routing the compile through the layer's fallback (
crate::dxc::compile, the system's compiler first, DXC where it refuses) is the whole fix; I have it in my line and will post the numbers of the first run with it.@slauko on GitHub · 2026-11-26 08:42 UTC · original
The numbers with it working (Wine, RTX 3080 Ti, vkd3d-proton
ec20719, uiliannn's line, the cell at about 5,000 draws a frame,VICTORY_CARD_FETCH_INFLIGHT=1,..._MB=128, everything else the same in both runs):copying backSo the wait it removes is real — 141 ms a frame of that thread's time, exactly as you measured — but the fetch's copies and dispatches run on the card, and on this stack the card is the frame's limit already: what comes off the relay's thread goes onto the critical path and then some. It is the right switch where the CPU wait is the limit (a faster card, a higher frame rate); here it is off.
Two things I would keep in mind for other trees: the compile has to go through the layer's fallback or Wine gets no fetch at all, and
relay_card_inflightreturning false on!plan.inflightreads exactly like "no pieces this frame" in the stats — theno fetch inside flightswarning is the only tell that the feature is not running.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.