shader: support dynamic view addresses and keep wave64 barriers opt-in #29
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/DoubleGhosty--cool_fox!29
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/29/head"
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?
@walterboyexe on GitHub · 2026-11-26 18:21 UTC · original
walterboyexe:fix/dynamic-view-addresses-wave64-opt-in→main· +482 −102 · 16 files · 10 commits · closed without mergingWhat and why
Some ray-tracing compute shaders load a BVH address through a dynamically indexed table/resource-heap descriptor. The existing
view_addresslowering handled only static table accesses, preventing these shaders from translating on a wave32 host.This change adds a per-view-slot GPU address table and extends lowering to read the low/high address dwords for dynamic indices. It also addresses repeated arbitrary PSV semantic names and preserves scalar values when lane-mask bits are consumed as data.
Changes
SLOT_VIEW_ADDRESSES, an 8-byte-per-slot address buffer, and bind it as a root SRV. Keep its GPU resource alive for command lists and clear/update entries along with descriptor-slot lifecycle changes.view_addressfor dynamically indexedTableandResourceHeapaccesses, clamping the heap index before loading the two address dwords.Verification
cargo test --locked -p victory-shader: 285 passed, 0 failed, 4 ignored on the cleanorigin/main-based patch.cargo build --release --locked -p victory: passed.VICTORY_HOST_WAVE=32,translate --validateemitted and validated 2,655 of 2,682 compute programs. The remaining 27 are rejected because wave32 lowering is unavailable; emitted compute shaders had no DXIL validation failures.git diff --check: clean. Workspace Clippy was not run.In-game report
On my hardware, running on Windows 11 Pro, the first part of the first mission reaches approximately 18 FPS, with milder stutter than before. This is an observed gameplay result, not a controlled benchmark.
Hardware:
Ryzen 7 7700X;
32 GB RAM DDR5;
5060 TI 16 GB;
WD SN850X.
Stability / follow-up
A prior run reported GPU device removal after broad wave-wide lowering was enabled. The log did not identify a shader, so this change does not claim that the crash is conclusively fixed. Retest with the conservative cache; if the crash persists, compare with
VICTORY_LIBRARY_TRIM=0to help isolate the pipeline-library save/trim path and collect a D3D12/DRED diagnostic log.AI assisted: yes
@DoubleGhosty on GitHub · 2026-11-26 20:11 UTC · original
Merged into main via
776b73e. Dynamic view address buffers and opt-in wave64 barriers verified with workspace clippy and full victory-shader test suite (286 passed).Pull request closed