Shaders: one lane of a wave sets a mark its wave shares (frames 411 -> 283 ms on an RTX 4070 SUPER) #2958

Open
github-bot wants to merge 2 commits from github-bot/gh-2958 into main AGit
Owner

@⁠moe-miau on GitHub · 2026-11-26 01:30 UTC · original
moe-miau:perf/mark-lead → main · +70 −0 · 2 files · 2 commits · open

Problem

Every store through a heap view sets its 64 KiB page's bit in the write-mark bitmap, and every heap-direct texture read sets its slot's read mark (Lower::mark_view_write, Lower::mark_view_read). Each is a load of the bitmap word, plus an atomic OR where the bit is clear. The bitmap is a shared_buffer in system memory, because the CPU reads and clears it after each submission. So each of those loads crosses the bus, once per lane, for every marked store or read.

Most lanes of a wave write the same page or read the same slot. On an RTX 4070 SUPER the passes that store the most were far slower than the same passes in other trees: a 1.5M-thread clear of three R32_UINT buffers (a7eeed0646be1ab7) took 20-41 ms.

Codex pointed at the mark traffic. I confirmed it by moving the bitmap into video memory (GPU upload heap) in a local build. GPU time dropped sharply (b58eb3ca6ee46427: 236 → 11 ms per dispatch), but CPU copy-back went to 2.8 s a frame, because the CPU's reads of that memory are uncached. So the bitmap stays where it is, and fewer lanes touch it.

Change

A lane whose mark bit equals the leading lane's leaves the load and the atomic to that lane; lanes with other bits still set their own (new lower/marks.rs, so lower.rs stays under the asset-policy size limit). The leading lane is the first active one (waveReadLaneFirst, waveIsFirstLane), and in pixel shaders the first that is no helper, since a helper's writes are dropped (lowest lane index among non-helpers by waveActiveOp min, then waveReadLaneAt).

Tested

RTX 4070 SUPER, driver 32.0.16.1742, Windows 11 26300. Title 1.0.2.1, Series X profile, diag build, scripted Enter presses, 15-minute runs. Tree: main f3578e3 + #2464 + #2098 + #2626 + #2628 + #2711 + #2851 + #2705 (VICTORY_CARD_COPIES=1) + #2925, then + this.

ms per frame (last samples) on the GPU fps over the last 12 min
without this PR 411-414 290-292 2.4-2.5
with this PR, run 1 323-331 198-208 3.0
with this PR, run 2 ~330 2.9-3.1
with this PR incl. pixel shaders (head) 281-283 151 3.3-3.6

No device removal in any run. Picture at the same scripted moments matches the run without this PR (the prologue cell).

  • victory translate --validate on the light-volume pixel shader (a885ba5d98ce46bf) and the clear (a7eeed0646be1ab7): both validate.
  • writes_through_views_mark_their_pages and straddling_writes_across_256mib_and_4gib_boundaries_mark_exact_pages (they check marks on the GPU): pass.
  • cargo test -p victory-shader --lib --skip heap_direct_texture_reads_mark_their_heap_index: 298 passed, 3 failed: the same three as main on NVIDIA (a_heap_buffer_read_by_element_takes_the_views_stride, a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, gathers_at_a_level_match_the_hardware). The skipped test crashes the process on main here too (#2571).
  • cargo clippy --workspace --all-targets --locked -- -D warnings: clean. cargo xtask policy: ok.

AI-assisted (Claude Code; diagnosis with Codex). Runs done on my machine.

🤖 Generated with Claude Code

**@⁠moe-miau** on GitHub · 2026-11-26 01:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/2958) `moe-miau:perf/mark-lead` → `main` · +70 −0 · 2 files · 2 commits · open ## Problem Every store through a heap view sets its 64 KiB page's bit in the write-mark bitmap, and every heap-direct texture read sets its slot's read mark (`Lower::mark_view_write`, `Lower::mark_view_read`). Each is a load of the bitmap word, plus an atomic OR where the bit is clear. The bitmap is a `shared_buffer` in system memory, because the CPU reads and clears it after each submission. So each of those loads crosses the bus, once per lane, for every marked store or read. Most lanes of a wave write the same page or read the same slot. On an RTX 4070 SUPER the passes that store the most were far slower than the same passes in other trees: a 1.5M-thread clear of three R32_UINT buffers (`a7eeed0646be1ab7`) took 20-41 ms. Codex pointed at the mark traffic. I confirmed it by moving the bitmap into video memory (GPU upload heap) in a local build. GPU time dropped sharply (`b58eb3ca6ee46427`: 236 → 11 ms per dispatch), but CPU copy-back went to 2.8 s a frame, because the CPU's reads of that memory are uncached. So the bitmap stays where it is, and fewer lanes touch it. ## Change A lane whose mark bit equals the leading lane's leaves the load and the atomic to that lane; lanes with other bits still set their own (new `lower/marks.rs`, so `lower.rs` stays under the asset-policy size limit). The leading lane is the first active one (`waveReadLaneFirst`, `waveIsFirstLane`), and in pixel shaders the first that is no helper, since a helper's writes are dropped (lowest lane index among non-helpers by `waveActiveOp` min, then `waveReadLaneAt`). ## Tested RTX 4070 SUPER, driver 32.0.16.1742, Windows 11 26300. Title 1.0.2.1, Series X profile, diag build, scripted Enter presses, 15-minute runs. Tree: `main` `f3578e3` + #2464 + #2098 + #2626 + #2628 + #2711 + #2851 + #2705 (`VICTORY_CARD_COPIES=1`) + #2925, then + this. | | ms per frame (last samples) | on the GPU | fps over the last 12 min | |---|---:|---:|---| | without this PR | 411-414 | 290-292 | 2.4-2.5 | | with this PR, run 1 | 323-331 | 198-208 | 3.0 | | with this PR, run 2 | ~330 | | 2.9-3.1 | | with this PR incl. pixel shaders (head) | 281-283 | 151 | 3.3-3.6 | No device removal in any run. Picture at the same scripted moments matches the run without this PR (the prologue cell). - `victory translate --validate` on the light-volume pixel shader (`a885ba5d98ce46bf`) and the clear (`a7eeed0646be1ab7`): both validate. - `writes_through_views_mark_their_pages` and `straddling_writes_across_256mib_and_4gib_boundaries_mark_exact_pages` (they check marks on the GPU): pass. - `cargo test -p victory-shader --lib --skip heap_direct_texture_reads_mark_their_heap_index`: 298 passed, 3 failed: the same three as `main` on NVIDIA (`a_heap_buffer_read_by_element_takes_the_views_stride`, `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `gathers_at_a_level_match_the_hardware`). The skipped test crashes the process on `main` here too (#2571). - `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean. `cargo xtask policy`: ok. AI-assisted (Claude Code; diagnosis with Codex). Runs done on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Every store through a heap view sets its page's bit in the write-mark
bitmap, and every heap-direct texture read its slot's read mark: a load of
the bitmap word, and an atomic OR where the bit is clear. The bitmap is in
system memory (the CPU reads and clears it after each submission), so on
the GPU each of those loads crosses the bus, once per lane. Most lanes of a
wave write the same 64 KiB page or read the same slot.

Lanes whose bit equals the first active lane's now leave the load and the
atomic to that lane (`waveReadLaneFirst`, `waveIsFirstLane`). In pixel
shaders the leading lane is the first that is no helper (a helper's writes
are dropped): the lowest lane index among non-helpers, by `waveActiveOp`
min, and `waveReadLaneAt` of it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:18:38 +00:00
A pixel wave of helpers only had no non-helper lane, so the minimum key was
u32::MAX and waveReadLaneAt read past the wave. A helper's key is now its
lane with bit 30 set: the minimum is the first non-helper, or a helper that
no lane matches as leader, at a lane index that exists (bit 30 masked off).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-26 02:31 UTC · original · edited 2026-11-26 02:40 UTC

@⁠moe-miau @⁠fuzeofficlal I exercised both cases from the review on 2b48889a, with synthetic guest instructions and GPU readback of the actual write-mark bitmap.

Adapter Compute groups with correct stores and page bits Pixel draws with correct color, atomic count and page bit
RTX 5080 9/9 5/5
Windows built-in WARP 9/9 5/5
Microsoft.Warp 1.0.22 9/9 5/5

Compute. Group sizes were 1, 3, 7, 31, 32, 33, 63, 64 and 65. Lanes whose thread ID is a multiple of four skip the store, including thread 0. The remaining three classes write different 64 KiB pages of one view, crossing a bitmap-word boundary at bits 31–33. For 3 threads, bits 31 and 32 were set. For 7 threads, bits 31, 32 and 33 were set. All nine cases also passed with fixed-width compute shaders on RTX Wave32, built-in WARP Wave4, and portable WARP Wave4/32/64. A control that kept only the leader lost bit 32 in the 3-thread dispatch on all three adapters, even though both stores landed.

Pixel. Four draws each covered one pixel, moving it through all four corners of the same quad. A fifth triangle put its edge through several quads and covered 21 pixels. Each covered pixel did a bounded UAV atomic add. The counts were 1, 1, 1, 1, 21, and exactly page bit 31 was set on every draw. A control that selected physical lane zero lost the mark on the top-right single-pixel draw on all three adapters; the color and atomic count still showed the draw executed. These draws cover mixed real/helper quads. They cannot observe what an all-helper wave computes for its source index, so the reviewer's range-guard question remains open.

Compute regression ead53d4 and pixel regression dc84e33. The second commit adds test-host readback for graphics UAVs. To run both from this PR head:

git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2958-mixed-marks
git cherry-pick ead53d4 dc84e33
cargo test -p victory-shader --lib divergent_view_writes_mark_each_page_in_partial_groups -- --nocapture
cargo test -p victory-shader --lib partially_covered_quads_mark_their_pixel_store -- --nocapture

The shader crate passed Clippy with warnings denied. These are correctness readbacks; I didn't measure frame time.

Follow-up for the helper-lane review. Source-only commit 3c30d80 elects the pixel leader inside !isHelperLane, using WaveReadLaneFirst and WaveIsFirstLane. I checked the emitted pixel DXIL: helpers bypass the election, provide false at the join and skip the bitmap load/atomic. The marker emits no indexed lane read, so an all-helper wave has no source index to clamp. The RTX and both WARP versions still passed all five pixel draws. A second version of the 21-pixel triangle sent alternate columns to two pages; all three adapters returned 9 and 12 atomic increments and exactly bits 31 and 32 both before and after the change. The nine compute groups, original write-mark test and strict Clippy also passed on the candidate. I haven't measured the extra branch on a game frame.

The source commit cherry-picks independently of the test commits:

git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2958-pixel-real-mark
git cherry-pick 3c30d80
**@⁠steven-seagull27** on GitHub · 2026-11-26 02:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/2958#issuecomment-7180876247) · edited 2026-11-26 02:40 UTC @⁠moe-miau @⁠fuzeofficlal I exercised both cases from the review on `2b48889a`, with synthetic guest instructions and GPU readback of the actual write-mark bitmap. | Adapter | Compute groups with correct stores and page bits | Pixel draws with correct color, atomic count and page bit | |---|---:|---:| | RTX 5080 | 9/9 | 5/5 | | Windows built-in WARP | 9/9 | 5/5 | | Microsoft.Warp 1.0.22 | 9/9 | 5/5 | **Compute.** Group sizes were 1, 3, 7, 31, 32, 33, 63, 64 and 65. Lanes whose thread ID is a multiple of four skip the store, including thread 0. The remaining three classes write different 64 KiB pages of one view, crossing a bitmap-word boundary at bits 31–33. For 3 threads, bits 31 and 32 were set. For 7 threads, bits 31, 32 and 33 were set. All nine cases also passed with fixed-width compute shaders on RTX Wave32, built-in WARP Wave4, and portable WARP Wave4/32/64. A control that kept only the leader lost bit 32 in the 3-thread dispatch on all three adapters, even though both stores landed. **Pixel.** Four draws each covered one pixel, moving it through all four corners of the same quad. A fifth triangle put its edge through several quads and covered 21 pixels. Each covered pixel did a bounded UAV atomic add. The counts were `1, 1, 1, 1, 21`, and exactly page bit 31 was set on every draw. A control that selected physical lane zero lost the mark on the top-right single-pixel draw on all three adapters; the color and atomic count still showed the draw executed. These draws cover mixed real/helper quads. They cannot observe what an all-helper wave computes for its source index, so the reviewer's range-guard question remains open. [Compute regression ead53d4](https://github.com/steven-seagull27/VIctory/commit/ead53d4eaee103b33597e27b94b8334b2200ed7c) and [pixel regression dc84e33](https://github.com/steven-seagull27/VIctory/commit/dc84e33c56026e0ac9173455068d26ca3ebe7afb). The second commit adds test-host readback for graphics UAVs. To run both from this PR head: ```sh git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2958-mixed-marks git cherry-pick ead53d4 dc84e33 cargo test -p victory-shader --lib divergent_view_writes_mark_each_page_in_partial_groups -- --nocapture cargo test -p victory-shader --lib partially_covered_quads_mark_their_pixel_store -- --nocapture ``` The shader crate passed Clippy with warnings denied. These are correctness readbacks; I didn't measure frame time. **Follow-up for the helper-lane review.** [Source-only commit 3c30d80](https://github.com/steven-seagull27/VIctory/commit/3c30d800e43b7f31dabb3a2a1ad91c93ae239715) elects the pixel leader inside `!isHelperLane`, using `WaveReadLaneFirst` and `WaveIsFirstLane`. I checked the emitted pixel DXIL: helpers bypass the election, provide `false` at the join and skip the bitmap load/atomic. The marker emits no indexed lane read, so an all-helper wave has no source index to clamp. The RTX and both WARP versions still passed all five pixel draws. A second version of the 21-pixel triangle sent alternate columns to two pages; all three adapters returned 9 and 12 atomic increments and exactly bits 31 and 32 both before and after the change. The nine compute groups, original write-mark test and strict Clippy also passed on the candidate. I haven't measured the extra branch on a game frame. The source commit cherry-picks independently of the test commits: ```sh git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2958-pixel-real-mark git cherry-pick 3c30d80 ```
Author
Owner

@⁠moe-miau on GitHub · 2026-11-26 04:26 UTC · original

@⁠fuzeofficlal Good catch, fixed in 1f9c4b3: a helper's key is now its lane with bit 30 set, so the minimum is the first non-helper, or in an all-helper wave a helper no lane matches as leader, and waveReadLaneAt reads at that key with bit 30 masked off (a lane that exists). The light-volume pixel shader still validates (victory translate --validate), and the two GPU mark tests pass.

@⁠steven-seagull27 @⁠Dukestar69 @⁠kotekompotek thanks for the runs and the review.

**@⁠moe-miau** on GitHub · 2026-11-26 04:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/2958#issuecomment-7182595836) @⁠fuzeofficlal Good catch, fixed in `1f9c4b3`: a helper's key is now its lane with bit 30 set, so the minimum is the first non-helper, or in an all-helper wave a helper no lane matches as leader, and `waveReadLaneAt` reads at that key with bit 30 masked off (a lane that exists). The light-volume pixel shader still validates (`victory translate --validate`), and the two GPU mark tests pass. @⁠steven-seagull27 @⁠Dukestar69 @⁠kotekompotek thanks for the runs and the review.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 05:28 UTC · original

Automated triage for the maintainers.

This cuts down write- and read-mark traffic to the system-memory bitmap. In Lower::mark_view_write and Lower::mark_view_read, the bitmap load and atomic now sit behind mark_lead (new emit/lower/marks.rs). A lane skips them only when its mark bit equals that of the leading lane, so every distinct bit is still set by at least one active lane. The marks themselves don't change. In compute, the leader is the first active lane (waveReadLaneFirst/waveIsFirstLane). In pixel shaders, it is the first non-helper lane, picked with a keyed waveActiveOp minimum. 1f9c4b3 fixes the all-helper case, so the read-lane index always names a real lane. Keeping it in a submodule keeps lower.rs under the policy size limit. CI: passing.

One suggestion: @⁠steven-seagull27's GPU readback tests for partial groups and partially covered quads (ead53d4, dc84e33, linked in the thread) would pin this behaviour in the repo. Pulling them in would be worthwhile.

Verdict: merge candidate. Recommending a look, not approving.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-26 05:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/2958#issuecomment-7183520037) <!-- victory-triage v1 head=1f9c4b3771cec8a429bf9a8dd26bfc525c224b05 verdict=merge-candidate at=2026-11-26T05:28:29Z --> Automated triage for the maintainers. This cuts down write- and read-mark traffic to the system-memory bitmap. In `Lower::mark_view_write` and `Lower::mark_view_read`, the bitmap load and atomic now sit behind `mark_lead` (new `emit/lower/marks.rs`). A lane skips them only when its mark bit equals that of the leading lane, so every distinct bit is still set by at least one active lane. The marks themselves don't change. In compute, the leader is the first active lane (`waveReadLaneFirst`/`waveIsFirstLane`). In pixel shaders, it is the first non-helper lane, picked with a keyed `waveActiveOp` minimum. `1f9c4b3` fixes the all-helper case, so the read-lane index always names a real lane. Keeping it in a submodule keeps `lower.rs` under the policy size limit. CI: passing. One suggestion: @⁠steven-seagull27's GPU readback tests for partial groups and partially covered quads (`ead53d4`, `dc84e33`, linked in the thread) would pin this behaviour in the repo. Pulling them in would be worthwhile. **Verdict: merge candidate.** Recommending a look, not approving. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠walterwallaceson on GitHub · 2026-11-26 05:52 UTC · original

RTX 3070 8 GB, Windows 10: GPU time goes down as intended (~370 → 260-290 ms a frame), but the frame gets 2-3× slower overall. Copy-back rises from ~60 to 470-690 ms a frame, and host copies run at about a fifth of their usual throughput. Two runs each.

Setup: RTX 3070 8 GB, driver 621.14, Windows 10 22H2 (19045). main 63bcca4 + #463 (Agility runtime, needed on Windows 10) + #2626, then + this PR at 1f9c4b3. Diag build, Enter scripted at 17, 30 and 60 s, nothing skipped. Averages over minutes 5-10 of each run, from the frame-rate lines:

fps ms/frame on the GPU preparing copies (ms / MB / throughput) copying back (ms / MB)
without this PR, run 1 1.79 562 364 134 46 / 104 / 2.3 GB/s 62 / 0.0
without this PR, run 2 1.73 582 383 138 41 / 111 / 2.7 GB/s 59 / 0.0
with this PR, run 1 0.60 1,697 293 456 215 / 108 / 0.5 GB/s 691 / 0.2
with this PR, run 2 0.74 1,376 261 487 225 / 99 / 0.44 GB/s 470 / 0.1
with this PR + #2705 (7dcc595, VICTORY_CARD_COPIES=1) 0.84 1,225 211 533 167 / – 357 / –

No device removal or errors in any run. The amount copied is the same with and without the PR. What changes is the time: the copies and the copy-back both slow down while barely any more data comes back.

Your tree had #2705 with VICTORY_CARD_COPIES=1, so I added it (last row; the log shows card copies on, 7.5-8.6 MB a frame up). That brings GPU time down further, but copy-back stays around 360 ms and the frame is still about twice as slow as without this PR. Your tree also had #2098/#2464/#2628, which ours doesn't, so one of those may be what keeps copy-back short there.

Not tested: why the copy-back slows (no profile); #2705 without this PR on this card (running now); a third run; the picture.

No game data attached. I'm testing with Claude's help, and Claude drafted this comment.

**@⁠walterwallaceson** on GitHub · 2026-11-26 05:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/2958#issuecomment-7183882982) **RTX 3070 8 GB, Windows 10: GPU time goes down as intended (~370 → 260-290 ms a frame), but the frame gets 2-3× slower overall. Copy-back rises from ~60 to 470-690 ms a frame, and host copies run at about a fifth of their usual throughput. Two runs each.** **Setup:** RTX 3070 8 GB, driver 621.14, Windows 10 22H2 (19045). `main` `63bcca4` + #463 (Agility runtime, needed on Windows 10) + #2626, then + this PR at `1f9c4b3`. Diag build, Enter scripted at 17, 30 and 60 s, nothing skipped. Averages over minutes 5-10 of each run, from the frame-rate lines: | | fps | ms/frame | on the GPU | preparing | copies (ms / MB / throughput) | copying back (ms / MB) | |---|---|---|---|---|---|---| | without this PR, run 1 | 1.79 | 562 | 364 | 134 | 46 / 104 / 2.3 GB/s | 62 / 0.0 | | without this PR, run 2 | 1.73 | 582 | 383 | 138 | 41 / 111 / 2.7 GB/s | 59 / 0.0 | | with this PR, run 1 | 0.60 | 1,697 | 293 | 456 | 215 / 108 / 0.5 GB/s | 691 / 0.2 | | with this PR, run 2 | 0.74 | 1,376 | 261 | 487 | 225 / 99 / 0.44 GB/s | 470 / 0.1 | | with this PR + #2705 (`7dcc595`, `VICTORY_CARD_COPIES=1`) | 0.84 | 1,225 | 211 | 533 | 167 / – | 357 / – | No device removal or errors in any run. The amount copied is the same with and without the PR. What changes is the time: the copies and the copy-back both slow down while barely any more data comes back. Your tree had #2705 with `VICTORY_CARD_COPIES=1`, so I added it (last row; the log shows card copies on, 7.5-8.6 MB a frame up). That brings GPU time down further, but copy-back stays around 360 ms and the frame is still about twice as slow as without this PR. Your tree also had #2098/#2464/#2628, which ours doesn't, so one of those may be what keeps copy-back short there. Not tested: why the copy-back slows (no profile); #2705 without this PR on this card (running now); a third run; the picture. No game data attached. I'm testing with Claude's help, and Claude drafted this comment.
Author
Owner

@⁠walterwallaceson on GitHub · 2026-11-26 06:20 UTC · original

Correction to my comment above: don't count the slowdown against this PR yet. A control run of the exact tree I called "without this PR" (main 63bcca4 + #463 + #2626, same binary as the 1.79 fps run) came out at 0.93 fps, with copy-back at 280 ms, about the same as the runs with this PR. On this RTX 3070, frame rate swings between roughly 0.7 and 1.8 fps from run to run of the same build, for a reason I haven't found yet (the memory use and draws per frame look alike). My two "without" runs happened to be fast ones.

What still holds: GPU time per frame was lower in every run with this PR (211-293 ms against 333-383 without), which is the part this PR changes. I'll come back with numbers once I can measure the run-to-run spread on this card.

I'm testing with Claude's help, and Claude drafted this comment.

**@⁠walterwallaceson** on GitHub · 2026-11-26 06:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2958#issuecomment-7184335309) **Correction to my comment above: don't count the slowdown against this PR yet.** A control run of the exact tree I called "without this PR" (`main` `63bcca4` + #463 + #2626, same binary as the 1.79 fps run) came out at **0.93 fps, with copy-back at 280 ms**, about the same as the runs with this PR. On this RTX 3070, frame rate swings between roughly 0.7 and 1.8 fps from run to run of the same build, for a reason I haven't found yet (the memory use and draws per frame look alike). My two "without" runs happened to be fast ones. What still holds: GPU time per frame was lower in every run with this PR (211-293 ms against 333-383 without), which is the part this PR changes. I'll come back with numbers once I can measure the run-to-run spread on this card. I'm testing with Claude's help, and Claude drafted this comment.
Author
Owner

@⁠MeMako on GitHub · 2026-11-26 07:00 UTC · original

Verified #2958 (1f9c4b3) on AMD RDNA 4 (Windows 11 10.0.26200, Ryzen 9 7950X, RX 9070 XT, driver 32.0.32029.2010, 32 GB RAM).

Tests

  • cargo clippy -p victory-shader -p victory-gpu -p victory --all-targets --locked -- -D warnings: clean.
  • cargo test -p victory-shader --lib --locked: 305/305 passed, 0 failed — including all 3 GPU mark tests (writes_through_views_mark_their_pages, straddling_writes_across_256mib_and_4gib_boundaries_mark_exact_pages, and heap_direct_texture_reads_mark_their_heap_index).
  • Translated all 25,985 shaders cleanly via victory translate --cache (0 crashes / 0 regressions).

Live Title Verification (RX 9070 XT)

  • Setup: Local integration branch (main 63bcca4 + #2051 + #2472 + #2918 + #1010 + #2130 with VRAM upload flags off + #3055 + #2914 + #2985 + #2849 + #3035), before vs. after merging #2958 (n=65 world / n=53 heavy frames vs. n=54 / n=38 baseline).
  • Result: 0 crashes, 0 device removals, 0 visual regressions through the intro and opening world scene.
  • GPU time:
    • Heavy frames (>=4k draws): median 166.9 → 162.2 ms, avg 194.7 → 169.9 ms (-24.8 ms on streaming spikes)
    • Steady tail (last 20 heavy, ~6,056 vs. 6,186 draws): median 162.5 → 158.4 ms (-4.1 ms), avg 162.3 → 159.9 ms
  • Cross-vendor note: Unlike NVIDIA (290 → 151 ms on RTX 4070 SUPER), RDNA 4's L2 + Infinity Cache already kept GPU time near ~162 ms before this PR, so the steady-state GPU delta on RX 9070 XT is small (-4.1 ms) with stronger improvement on heavy spikes (-24.8 ms avg) and zero regressions.

Hardware runs were performed by me on my 7950X / RX 9070 XT; comment drafted with Antigravity.

**@⁠MeMako** on GitHub · 2026-11-26 07:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/2958#issuecomment-7185003944) Verified `#2958` (`1f9c4b3`) on AMD RDNA 4 (Windows 11 `10.0.26200`, Ryzen 9 7950X, RX 9070 XT, driver `32.0.32029.2010`, 32 GB RAM). ### Tests - `cargo clippy -p victory-shader -p victory-gpu -p victory --all-targets --locked -- -D warnings`: clean. - `cargo test -p victory-shader --lib --locked`: **305/305 passed**, 0 failed — including all 3 GPU mark tests (`writes_through_views_mark_their_pages`, `straddling_writes_across_256mib_and_4gib_boundaries_mark_exact_pages`, and `heap_direct_texture_reads_mark_their_heap_index`). - Translated all **25,985** shaders cleanly via `victory translate --cache` (0 crashes / 0 regressions). ### Live Title Verification (RX 9070 XT) - **Setup:** Local integration branch (`main` `63bcca4` + `#2051` + `#2472` + `#2918` + `#1010` + `#2130` with VRAM upload flags off + `#3055` + `#2914` + `#2985` + `#2849` + `#3035`), before vs. after merging `#2958` (`n=65` world / `n=53` heavy frames vs. `n=54` / `n=38` baseline). - **Result:** 0 crashes, 0 device removals, 0 visual regressions through the intro and opening world scene. - **GPU time:** - Heavy frames (`>=4k` draws): median **166.9 → 162.2 ms**, avg **194.7 → 169.9 ms** (**-24.8 ms** on streaming spikes) - Steady tail (last 20 heavy, ~6,056 vs. 6,186 draws): median **162.5 → 158.4 ms** (**-4.1 ms**), avg **162.3 → 159.9 ms** - **Cross-vendor note:** Unlike NVIDIA (`290 → 151 ms` on RTX 4070 SUPER), RDNA 4's L2 + Infinity Cache already kept GPU time near ~162 ms before this PR, so the steady-state GPU delta on RX 9070 XT is small (`-4.1 ms`) with stronger improvement on heavy spikes (`-24.8 ms` avg) and zero regressions. *Hardware runs were performed by me on my 7950X / RX 9070 XT; comment drafted with Antigravity.*
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2958/head:github-bot/gh-2958'
git switch 'github-bot/gh-2958'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2958'
git switch 'github-bot/gh-2958'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2958'
git switch 'github-bot/gh-2958'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2958'
git switch 'main'
git merge --squash 'github-bot/gh-2958'
git switch 'main'
git merge --ff-only 'github-bot/gh-2958'
git switch 'main'
git merge 'github-bot/gh-2958'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2958
No description provided.