Fix wide shader accesses across title-memory pages #846
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!846
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-846"
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?
@gomeaw on GitHub · 2026-11-25 10:22 UTC · original
gomeaw:fix/shader-title-memory-boundaries→main· +124 −39 · 1 files · 1 commits · openProblem
The page directory maps each 64 KiB guest page to a host buffer view and byte offset. Wide
global_load_dwordxN,global_store_dwordxN, ands_load_dwordxNinstructions lowered through that directory previously resolved only the starting page. When a transfer straddles a boundary, it can pick up unrelated bytes from the first backing buffer or overwrite them. This path is used by compute shaders including the ray-tracing structure builder.Change
Keep one vector access for each group of up to four dwords that fits in a page. For a straddling group, resolve the next page with the 64-bit address carry and use the appropriate backing view, byte offset, and fault handling for each portion. Root-descriptor loads and the ray-box node reader have their own lowering.
Verification
[17, 17]where[17, 34]was expected, and a crossing store overwrote an unrelated dword beyond the first guest page. Windows WARP comparisonThe WARP fixture lives on the fork's validation branch and reuses fixture support from #33. That PR exercises ray-box node reads. This patch addresses the general memory instructions and applies alongside #33. In-game visual impact and hardware timing remain unmeasured.
@Rezwo on GitHub · 2026-11-25 10:42 UTC · original
Independent Turing hardware reproduction: NVIDIA GeForce RTX 2080 Ti, Windows driver 32.0.16.2101.
I used your validation/shader-title-memory-boundaries branch at 81746e95de79ac1344f6f763c3407dd6be8f390e, including its fixture support from #33. This is not a test of the production-only PR checkout. The PR head is still
df399bd998.Local harness changes: Host::new(true) became Host::new(false), with initialization required (no skip); added actual adapter name/flags and per-case logging. The inputs and assertions were unchanged. Logs identified NVIDIA GeForce RTX 2080 Ti, flags=0.
Command:
cargo test --locked -p victory-shader --lib wide_title_memory_ -- --nocapture
Results:
9376fd60c0version, keeping the hardware harness and test inputs. All three test families failed, exit 101.The original global and scalar x2 crossing loads returned [17, 17] instead of [17, 34]. The original store changed an unrelated word after the first mapped page:
actual [17, 17, 17, 20, 21, 17, 17, 17]
expected [17, 17, 17, 20, 17, 17, 17, 17]
The passing cases include the low-address carry at 4 GiB, independent backing views with byte offsets, all tested split positions, and the missing-second-page checks. Separately executed the local rollback script on a copy and verified byte-for-byte restoration of the original lowering.
No game files or in-game runs. This confirms the synthetic memory corruption and its correction on Turing, not a measured lighting/stability improvement in the title.
AI-assisted (OpenAI Codex); tests executed locally.
@MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head
df399bdintomainf85101bin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warningsfails with exactly the errorsmainitself has on this machine (placed_filler_twins,depth_written, a sort; PR #841 fixes them), also with--all-features; this PR adds none.cargo test --workspace --locked: run 1: 555 passed, 0 failed, 11 ignored; run 2: 555 passed, 0 failed, 11 ignored (mainalone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
@ThomasHFWright on GitHub · 2026-11-25 14:45 UTC · original
Linux hardware validation of
df399bd99828cf41ea2bb38390d0c881fbfad2ac: all 61 synthetic cases pass on CachyOS / RTX 5090 / NVIDIA 620.73.04, using GE-Proton 11-14 Wine, DXC/DXIL 1.9.2609 and a Windows MSVC cross-build. I used gomeaw's three-family fixture from81746e95de79ac1344f6f763c3407dd6be8f390e, with hardware adapter selection instead of forced WARP (the logs confirm the RTX 5090).Coverage: 13 global-load, 13 global-store and 35 scalar-load cases, including independent biased mappings, aligned split positions, 4 GiB carry, missing-page values/faults and store canaries. Negative control: retaining the tests but restoring the previous lowering makes all three families fail at the first crossing x2 case. Loads return
[17,17]instead of[17,34]; the store overwrites the first buffer's canary. Fixed source restored afterward. Windows build, all-target/all-feature Clippy and asset policy pass.Integrated with author credits in LinVictory abdae98. This verifies the transfer correction on Linux hardware; it does not establish a gameplay fix. A separate normal-rendering title trial still hit an NVIDIA Xid 13/MMU fault after approximately 127 seconds, without verified scene geometry. That branch contains other Linux fixes, so the title result is not an isolated causal comparison. No game-derived fixtures, logs or shaders are included.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.