RTX 4090 (Windows, native D3D12): RELAY=2 and the late-wait set are about 40% faster on 4e17478, and both lose the first room's walls #168
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#168
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?
@ChruutvoLuzi on GitHub · 2026-11-24 22:06 UTC · original
Setup
4e17478(main) for the A/B below, diagnostics build (--profile diag --features diagnostics). Earlier release-build runs on004bf69and7b0f736are under Stability.Method
VICTORY_DATA_DIR), so all of them load the same checkpoint: the opening cutscene, then the player standing at the window of the first gameplay room. Input isVICTORY_KEYS=10:Enter,15:Enter,20:Enter,25:Enterand nothing after that. The world shows about 52 s after launch.WM_SYSCOMMAND/SC_CLOSE. The numbers are medians of the frame lines between 300 and 540 s, when every run is in gameplay with the camera at rest.VICTORY_CAPTURE_FRAMESand looked at them locally (not attached).indirect mesh dispatches: ... N groups asked per frameover the same window.Results
VICTORY_RELAY=2VICTORY_RELAY=2VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024VICTORY_RELAY=2 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024None of them logged an
ERRORline or lost the device.1. On native Windows both late modes are about 40% faster
Default runs at 314 to 331 ms a frame with the card about half busy.
VICTORY_RELAY=2and the late-wait set both get to 189 to 198 ms with the card three quarters busy. Under Wine (#6) it went the other way:RELAY=2was slower than default there.2. The first room loses its walls in every late-mode run and in no default run
The save, the inputs and the camera are the same in all six runs. In the four late-mode runs the room's left and right walls are gone, with sky and horizon where they should be and the window frame standing on its own. Both default runs draw the walls (block wall on the left, posters on the right). #6 saw the same under Proton ("buildings disappear ... floating window frames"), so it is not a Wine effect. The README's "interior of the first gameplay room is sometimes not drawn" may be the same thing.
Two other defects in these frames don't follow the switches. The grille over the window is missing in A2 and B1 and drawn in the other four, and A2 and B1 both show stair-stepped blocks along the edge of the player's shoulder.
3. Part of the relay's gain is less geometry
With
RELAY=2the title asks for about a fifth fewer mesh groups per frame (17,800 to 18,300 against 22,700 to 23,500) at the same number of draws, so some of the relay's speed-up is probably geometry that isn't drawn. The late-wait set asks for the full 23,700 and is just as fast, so its gain looks real. It loses the walls all the same, which means the mesh group count can't be the whole story there.Stability
004bf69, release, defaults: the device was lost 32 s after the first world frame withDEVICE_HUNG(0x887A0006) and no breadcrumbs, after the submitting thread had waited 5,250 ms for one list. That fits whate9765a7describes, and nothing after that commit lost the device here.7b0f736, release,VICTORY_RELAY=2: one 68-minute session, about 66 minutes of it in the world, with noERRORlines. Once the view settled it held 136 to 151 ms a frame at about 4,000 draws.4e17478, diagnostics build: seven 9-minute runs (the six above plus the warm-up), no device loss.Tests
cargo test --workspace --lockedon4e17478with the 4090 present: 496 passed, 0 failed, 7 ignored.WM_CLOSEleaves the title running without a windowtaskkillwithout/FsendsWM_CLOSE. The title's window went away, but the lifecycle hook only ends the title onWM_SYSCOMMAND/SC_CLOSE, so the process kept running and rendering with no window for an hour until I killed it. A script that closes the game this way will leave it running.AI-assisted (Claude Code). No game data attached.
@rebasecase on GitHub · 2026-11-24 22:56 UTC · original
Pull the other one 🤣
@Yorivel on GitHub · 2026-11-24 23:36 UTC · original
Same card, same room. Your A/B fits what I found on #62: the shell's draws run with data that draws nothing, and
VICTORY_FULL_REFRESH=1(a local switch that refreshes every copy whole, skipping the write tracking) brought the walls back in 3 runs out of 3, withVICTORY_RELAY=2on. So the relay and late-wait switches don't seem to cause the lost walls; they look like they widen a window where a write the tracking misses leaves a host copy stale for the rest of the run. I had one run lose the walls without relay too. Details and numbers: #62AI-assisted test report.
@hashdev512 on GitHub · 2026-11-24 23:47 UTC · original
Fifteen runs on an RX 9070 XT. They lean the same way as the table above, but less cleanly: here no setting draws the walls every time.
Setup: RX 9070 XT, Adrenalin 32.0.32029.2010, Ryzen 7 5700X3D, 32 GB, Windows 11 26300. Fork at
1684989(and2119b0efor the last row), each plus a local change that does not create a pipeline whose shader is on the skip list; diag build, Series X profile, warm cache. Every run:VICTORY_SHADER_OPT=11, the two skips from #145,VICTORY_KEYSto get past the start screen. No save here: each run plays the opening cutscene and is judged once the camera rests at the window, 250 to 400 frames after the first 500-draw frame, from saved frames kept locally (the first runs by eye, the later ones by the brightness of the strip left of the window, checked against the ones looked at).16849891684989VICTORY_LATE_WAIT=11684989VICTORY_LATE_WAIT=1 VICTORY_LATE_WAIT_LISTS=12119b0e1684989), as the README says and as a default run in #120 did.2119b0ewithout any late switch: 0 of 3. That is too few runs to blame the commit (about a 7 % chance against the 4 of 5 above), but three more compute programs translate and run there than on1684989(7f05ddab771799a9,a53a7977fe762268,be14e72d86362031), which I have not tried skipping yet.Frame time (median per run, frame capture on): 432-585 ms without a late switch, 478-520 ms with
VICTORY_LATE_WAIT=1. No difference I can separate from the spread between runs.Not tested:
VICTORY_RELAY, stages 2 and 3, skipping the three programs above, and the cause. The cameras are not identical between runs (no save), and the samples are small.No game data: counts and timings only.
AI-assisted (Claude Fable 5.2): the runs were launched and summarised by the model on my machine with my own copy of the game.
@Yorivel on GitHub · 2026-11-25 00:28 UTC · original
Follow-up: the lost walls have a cause and a candidate fix. DirectStorage writes to physical-page destinations went around the write tracking; details on #62 (https://github.com/Yorivel/victory-fork/tree/fix/dstorage-page-destinations-notify). With it, 3 runs out of 3 kept the walls with
VICTORY_RELAY=2on, at 226 ms/frame. It would be worth repeating your A/B on that branch.AI-assisted.
@VlREX on GitHub · 2026-11-25 00:29 UTC · original
For anyone investigating the missing walls/window geometry, I have prepared a public integration test branch combining #191 (gdawid9407), #206 and #207 (AscilCH), with the overlapping host hazard checks reconciled. This is intended for controlled A/B testing, not a duplicate upstream PR.
6341fb3be9ec0006325d5822d1e4bde8dcab6c34If anyone has time to test on the same checkpoint and camera with a warm cache, please compare the unmodified base and the integration branch with identical relay/late-wait settings. Wall, grille, ceiling and skin visibility, dropped draws, mesh group counts and frame times would be especially useful.
Native Windows/Rust validation and in-game A/B are still pending; this is not a claim that the rendering defect is fixed. Full credit to the original contributors. AI-assisted integration (ChatGPT).
@thefafu on GitHub · 2026-11-25 00:52 UTC · original
RDNA4 data for this, on a locally patched tree, so read it as "this stack", not as
main.Setup: RX 9060 XT 16 GB, driver 32.0.32029.2010, Ryzen 7 7800X3D, 32 GB RAM with a fixed 32 GB page file, Windows 11 26300, diag build, Series X profile, own 1.0.2.1 copy. Unmodified-fork runs on this machine are in #120.
Tree:
2119b0ewith these merged locally: #172, #195, #159, #187, #270, #147, #135, #156, #194, #265, #220, #38, #272 (runs 1-7), then also #203, #9, #52 (runs 8-13). #187 makes the relay the default, so "no late mode" below isVICTORY_RELAY=0. "Settled" is the median of the 5 s frame lines with 4,500-7,500 draws/frame and few draws dropped. "CB" isVICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024.0x887A0006"after 2 submissions sent ahead of 8 lists", no DREDVICTORY_RELAY=0VICTORY_RELAY=2, CB, DREDVICTORY_TEXTURE_SWEEP=0VICTORY_DISPLAY_MODE=1920x1080VICTORY_INPLACE=1VICTORY_RELAY=2, DRED1. The relay's device removal on this card is a page fault past the view heap, twice with the same shape. With
VICTORY_D3D12_DRED=1:after 8 submissions sent ahead of 71 lists; page fault at 0x11f100000; view heap 0x100100000+0x2e00000: 0x1c200000 past its end (slot 16252928)after 6 submissions sent ahead of 38 lists; page fault at 0x11e100000; view heap 0x100100000+0x2e00000: 0x1b200000 past its end (slot 15728640)Two builds, two resolutions, the same heap and nearly the same address. No pipeline was being made either time. This is probably what #60 saw without DRED ("no breadcrumbs"). #98 did not cure it here: with the heap capped at 1,000,000 (run 6) the device went in the menus, at
0xb0000264a000, with one submission sent ahead. That run also had a cold cache, so I can't put the earlier failure on #98 alone.2. Late modes lose the first room here too. Dark in run 5; in #120's unmodified runs the relay run was dark as well.
3. The card-buffer switches without any late mode, which the table above doesn't have: 12 to 19 % faster than relay 0 alone (267-289 ms against 330), 98 copies / 945 MB on the card against 10 / 492 MB. Raising the cap to 4096 MB changed nothing: the same 98 copies. The room was lit on arrival in 4 of 6 such runs (3, 4, 7, 9; dark in 10 and 12) against 0 of 1 without them (run 2), and one of the four lost its light later. So they may help, but the room is not steady with them either.
4. What does not buy speed on this card.
VICTORY_INPLACE=1(run 12): 79 windows, 368 MB in place, 0 title buffers, over 700 turned down as "view memory or not private memory committed whole". No gain.VICTORY_TEXTURE_SWEEP=0(run 10): 13 % faster (245 ms), but host copies of title-filled textures went from 16,387 / 5.4 GB to 23,772 / 8.8 GB and dedicated memory to 14.3 of 16 GB in five minutes.A settled frame with relay 0 and CB is about 80 ms preparing, 140-170 ms waiting for the card and 30 ms copying back. Only the relay touches the wait (15 ms in #120's run 5), and that is the part that faults.
5. Black props, and a regression that came with the fix. In run 7 eight programs did not translate and a cup and a notebook on the first room's table were black. With #203, #9 and #52 (run 8) seven of them translate, the props have their colour, and the room lost its walls. Skipping the four compute programs that had started to run (
VICTORY_SKIP_PIPELINES=b22a16a178976e1b,ceb5eb68cd99cb07,5dc3b25986622949,6f225b641c5b0708, run 9) brought the room back with the props still coloured. One run each way, so it may be chance, but one of those four is worth a look;b22a16a178976e1bruns 28 times a frame. The three pixel programs that now translate are7d0f14ce44746d7e,6b6db9f1a526daeband78f3f2fc53a69531. Still not translating:a929109552ce1e84(v_permlanex16_b32).6. Props flicker between textured and black as the camera turns. In run 9, 33,748 host copies of title-filled textures were let go and 6,372 made again in 6 minutes; the 5 s idle rule in
let_go_idlefits what I saw (look away for a few seconds, come back to a black prop that then gets its texture). The same churn is in the earlier runs' logs; it only became visible once those props were drawn.Not tested: a release build, the relay with a DRED run on unmodified
main, which of the four compute programs breaks the room, #81 and #134 (both conflict with this stack).AI-assisted (Claude Code Fable 5.2): it merged the PRs locally, read the logs and wrote this comment; the runs and what the picture looked like are mine. No game data here.
@Yorivel on GitHub · 2026-11-25 01:01 UTC · original
Follow-up from the same 4090 setup: with the DirectStorage page-write fix from #62 (
VICTORY_DSTORAGE_NOTIFY=1ona803c87),RELAY=2kept the first room's walls in 2 of 2 runs, at 217-261 ms/frame. The one run that lost them also hadCARD_BUFFERS_MIN_MB=1. Numbers and caveats are in #418.@Peppacodes on GitHub · 2026-11-25 01:30 UTC · original
The A/B on
fix/dstorage-page-destinations-notify, from an RTX 5080 (driver 621.24, Ryzen 7 5700X3D, Windows 11 26200).Setup:
4e17478, plus #28's watchdog hook and 64 MB pipeline-worker stacks.VICTORY_INDIRECT_WINDOWon or offRELAY=2+CARD_BUFFERS_MIN_MB=1 CARD_BUFFERS_MB=1024(+LATE_WAIT=3 WIDE_BACK=1)RELAY=2only32c6229, the relay set above, windows on7e239bf, the relay set above, windows off and onOne more run with the branch and the card buffers caught another camera moment, with dark walls on both sides. It isn't counted.
On this card the left wall is missing in every base run, unlike the 4090 table above, where the defaults drew it.
CARD_BUFFERS_MIN_MB=1.The numbers are small, but more than one thing seems to keep the wall away here. A guess I haven't confirmed for the #220 side:
7e239bfkeeps clamp groups past a count off the list's budget.draw.rsnotes that garbage records spending a list's budget empty the draws after them.Other details:
AI-assisted (Claude Code). Runs on my own machine with my own copy; frames looked at locally, none attached.
@thefafu on GitHub · 2026-11-25 01:51 UTC · original
Follow-up to my comment above, with a correction and runs on current
main.Correction to item 5 above. The walls lost in run 8 were most likely a cold pipeline cache, not one of the four compute programs. Run 8 was the first launch after rebuilding with #203/#9/#52: 4,803 draws were dropped while their pipelines were still being made (up to 900 per 5 s line). Runs 7 and 9 dropped none that way. Run 9's skip list came with a warm cache, so it proves nothing about those programs. Please disregard "one of those four is worth a look".
New runs. Same machine (RX 9060 XT, driver 32.0.32029.2010), diag build, Series X profile. Every run has
VICTORY_SHADER_OPT=59(this tree has no #195),VICTORY_TEXTURE_GUARD=0,VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024. "Settled" is defined as above.a803c87a803c87a803c87c96b4f2+ #203c6dc4d8(view guard)VICTORY_VIEW_GUARD=01.
31714defixes the relay's page fault past the view heap on this card. Before,VICTORY_RELAY=2removed the device about 70 s into the world in both runs (5 and 13 above, at slots 16252928 and 15728640). With the clamp (host view heaps hold 2097152 views) F2 and F4 ran 8.5 and 7.4 minutes without a removal, at 179 and 186 ms against 268 ms with the relay off (F3). The card's own time per frame is about 55 ms against about 110.2. A different removal, once. F7, same relay set:
device removed after 7 submissions sent ahead of 50 lists; page fault at 0x2552000; no title memory copy below it; ... view heap 0x100100000+0x4000000: 0xfdbae000 belowThis is a low address far below the heap, not the old shape. I have one run of it.
3. Walls: 1 of 5 launches here (F7), with the relay on and card buffers from 1 MiB. So on this card the card-buffer setting did not keep them away every time. Two of the four misses had a cold pipeline cache. The view guard was off in F7, so it was not what brought them back.
3b. Against my earlier stack. The stack of runs 1-13 above had #220 at
32c6229(and #194, #265, #272, which currentmaindoes not). There the first room's walls were drawn in every warm launch I looked at (runs 3, 4, 7, 9); the one launch without them (run 8) had a cold pipeline cache. On currentmainwithout #220 they were drawn in 1 of 5. Those stacks differ in more than #220, so this only fits Peppacodes' result, it does not isolate it.4. A view guard like #115 breaks a DirectStorage path here. With
c6dc4d8from myokex/victory-amd (#115 with joroyt's correction) on this tree, the title stopped itself (0x80000003in the title's own code) about 4 s afterdstorage: request failed: copying options=0x0 ... hr=0x800706f8(
ERROR_INVALID_USER_BUFFER). The read into a title address fails because the page is read-only. There were two such failures in that run, and none in F2-F5 or F7 (VICTORY_VIEW_GUARD=0). My guess: another view's guard makes the destination read-only again betweenkernel_will_writeand the kernel's read. Worth knowing for anyone combining a guard over aliased views with the DirectStorage notify branch from #62.Not tested: Yorivel's
fix/dstorage-page-destinations-notify, #220, VlREX's integration branch, a release build.AI-assisted (Claude Code): it read the logs, merged the trees and wrote this; the runs and the walls are mine. No game data here.
@FrancescoGelosoEterea on GitHub · 2026-11-25 01:59 UTC · original
One more possible cause for the missing walls, worth ruling out before comparing settings: #51.
The title leaves blending on for an
R8_UINTrender target in one world mesh pipeline. D3D12 does not allow that, so the driver refuses the pipeline and every draw that uses it is dropped. You can see it in the log:#51 turns blending off on integer targets only, and the pipeline is then created. Testers on #51 linked those dropped draws to the walls on two cards:
It was also checked on an RTX 5070 Ti, an RTX 4060 Ti and an RX 9070. #51 is rebased onto current
main(c96b4f2).This probably isn't the only cause. On the 4090 the walls come and go between runs, and a refused pipeline would fail in every run. Still, if a run's log has the line above, that run can't draw those walls whatever the relay or card-buffer settings. Checking for the line first may make the tables above easier to read.
@thefafu on GitHub · 2026-11-25 02:30 UTC · original
Follow-up with #220 and #51, as suggested above. Same machine and switches as my last comment (RX 9060 XT, diag build,
VICTORY_SHADER_OPT=59 VICTORY_TEXTURE_GUARD=0 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024, relay at its new default, DRED on).Tree:
c96b4f2+ #203 + myokex/victory-amdc6dc4d8withVICTORY_VIEW_GUARD=0(so as F7) + #220 at7e239bf(G runs), then also #51 (H runs).1. #220 brings the walls back on this card too: 4 of 5 launches, against 1 of 5 on the same tree without it (F1-F7 above). The one miss (H1) had a cold pipeline cache. This fits Peppacodes' 3 of 4 on the RTX 5080. Speed is unchanged (195-207 ms).
2. #51: the refusal is gone, but here it is not the walls. With #51, the
host mesh pipeline refused ... [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]line is gone (H1, H2). On this card, though, that pipeline is bound only briefly: in every run without #51 it dropped 0-2 draws a frame in at most one 5 s line. G1-G3 had the refused line and drew the walls; F2 and F4 had it and did not. So on this RX 9060 XT the walls come and go independently of it. #51 is still worth taking for the refusal itself.3. The relay still removes the device sometimes, with the clamp in place: 2 of 8 relay runs (F7 after ~2 min, H1 after ~3 min); the other six ran 3.7-8.5 min clean. H1:
device removed after 8 submissions sent ahead of 71 lists; page fault at 0x6000042ae000; ... view heap 0x100100000+0x4000000: 0x5fff001ae000 past its endThat is a garbage-looking address, unlike F7's low one (
0x2552000). In both, the list before the last ends with a dispatch of computec1488f485ad606fb("list 49 of 50, of its 13: dispatch 11x1x1"; "list 70 of 71, of its 13: dispatch 5x1x1"), and that program is in the removal dumps of every earlier removal on this machine too. It may just run often, so I only mention it as a lead.4. What still varies between launches with #220: the cup's colour (orange in G1 and H1, not in H2), the guard's body (there in G1 without feet; gone with the feet in H2), and one fully dark first room (G3, nothing in its log differs from G2). Shaded areas and faces are dark in every run, as the commit notes for
c96b4f2say.Not tested: Yorivel's DirectStorage notify branch, a release build, #220 on its own without #203/#51.
AI-assisted (Claude Code Fable 5.2): it read the logs, merged the trees and wrote this; the runs and what the picture showed are mine. No game data here.