Repository navigation
Conversation
The relay (VICTORY_RELAY) lands what shaders wrote on a thread of its own while the submitting thread prepares the next submissions; stage 2 waits only for the flights that declared memory a submission reads. It was off unless switched on. In the world of the test title on an RTX 4090 the frame went from about 230 to 132 ms with VICTORY_RELAY=2 (the card busy about 79 % of the frame instead of 51 %), and a 30-minute run with it had no error or crash at a steady 24-25 GB. VICTORY_RELAY is now read in one place (shadow::relay_level): unset or any other value means stage 2, `1` the first stage, `0` turns it off. The test buffer_data_reaches_the_host_texture checked that the title's list still held the texture after the submission. With the relay the submission takes the host list and the flight lets it go once the card has run it, which on a fast card can be before the check: the hold is now checked before the submission, where both paths keep it, and after it only when the submission is waited for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lj18ajyo1buNyoZcYjnZYC
Flyander
left a comment
There was a problem hiding this comment.
I tested the current PR #187 + #191 merge on an RTX 5070 Ti with VICTORY_RELAY unset: all 9 relay tests pass, and buffer_data_reaches_the_host_texture passes on the D3D12 device. That checks synchronization and a texture transfer, but it does not check rendered title frames.
Issue #168 reports a controlled, same-save RTX 4090 A/B on 4e17478: both default runs rendered the first room's walls; both VICTORY_RELAY=2 runs lost them, and the relay runs also requested roughly 20% fewer mesh groups. The issue predates #191, whose new alias/read-back waits may change the outcome.
Could you rerun the matched warm-cache capture on the current #187 + #191 candidate before making stage 2 the default, and attach the frame/matched mesh-group counts? The unit tests above cannot establish that visual output is intact.
…ge 2 by default Part of #16
|
Thanks @cblomert. I ran this on Linux (RTX 4080, Proton Experimental, 200 s per run at the prison cell window, nobody touching the pad). The tree was Stage 2 changes the picture, though. The cell's left wall is not drawn in either of the two stage-2 runs, and the sky shows through where it should be. With That is three runs in total, so take it as a lead rather than a proof. Still, it seems worth a check before stage 2 becomes the default. |
|
A follow-up from one more run, same binary and same spot, with Across the runs where the texture copy sits in the list, the result is:
So each stage loses some texture the title writes, and which one looks like a matter of timing rather than something specific to stage 2. Fence and wall are scored over the last 8 captured frames of each run: the brightness of the left strip, and the edge density in the window. |
Turns the relay (
VICTORY_RELAY) on at stage 2 by default. In the world it cut the frame from about 230 to 132 ms on an RTX 4090, and a 30-minute run with it had no error or crash.VICTORY_RELAY=0turns it off,1selects the first stage.What is in it
crates/victory-gpu/src/shadow.rs:relay_level()readsVICTORY_RELAYin one place (unset or any other value: 2;1;0: off);relay()uses it; unit test for the parsing.crates/victory-gpu/src/host.rs:relay_exact()usesrelay_level(); doc comments say what the default is.crates/victory-gpu/src/resource.rs:buffer_data_reaches_the_host_texturechecked that the title's list still held the texture after the submission. With the relay the submission takes the host list and the flight lets it go once the card has run it (execute_late→ relay thread →land/recycle), which on a fast card is before the check: the test failed 2 runs in 3. The hold is now checked before the submission, where both paths keep it, and after it only when the submission is waited for (!host::late()). Letting it go after the fence is safe: the read-backs are done before, and the texture's state lives inHostTexture, not in the list.README.md: the relay is no longer listed among the switches that are off by default.Tested
RTX 4090 (driver 621.40), i9-13900K, 128 GB, Windows 11 Pro 26200, rustc 1.98.1, release build for the game runs.
cargo clippy --workspace --all-targets --locked -- -D warnings: clean. With--all-features: clean.cargo test --workspace --locked --no-fail-fast: 495 passed, 2 failed, 7 ignored. The two failures areemit::rect::tests::the_rectangle_stage_is_a_geometry_shaderandrectangles_are_drawn_whole("Container part 'Pipeline State Validation' does not match"): they fail the same way onmain(4e17478) without this change (issue RTX 4070 Ti SUPER: prologue color vs. same-frame depth, plus a mesh PSV validation fix #12; Shaders: write every PSV0 semantic name again, as DXC does (fixes #12) #61 addresses it). No GPU test skipped.buffer_data_reaches_the_host_texture: 10 of 10 runs pass with the default; passes withVICTORY_RELAY=0.The title, world reached (first mission), median of 36 samples of the window title between 6 and 9 minutes after the start, the Enter pressed 60 s in:
VICTORY_RELAY=2VICTORY_RELAY=2 VICTORY_WIDE_BACK=1(on
mainplus 21 open PRs of this repository merged locally; the relay code is the same as onmainapart from GPU: use D3D12 COPY queue for relay card-copy fetches and parallelize CARD_COMPARE #71.) Card busy from the frame line "the card's clock per frame".30 minutes with
VICTORY_RELAY=2in the world: noERRORline, no panic, nocrashes.logentry, private memory steady at 24-25 GB.Not tested
AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lj18ajyo1buNyoZcYjnZYC