Shaders: verify compute writes through a spilled root UAV #1175
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1175
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1175/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?
@Castyan on GitHub · 2026-11-24 16:20 UTC · original
Castyan:compute-bvh-root-uav→main· +888 −18 · 14 files · 6 commits · closed without mergingDraft integration of #1077 with a focused regression for one synthetic compute shader that reconstructs a raw root UAV from a spilled argument. The new commit aligns the D3D12 validation host with the runtime's bounded, single-view UAV descriptor table.
The test writes one dword at byte offset 4 and checks the readback and an untouched control buffer. It passed on the hardware adapter and WARP. Workspace tests, shader Clippy and the asset policy check also passed.
This exercises the binding path relevant to #614. In-game BVH dispatch counts and rendering impact remain unmeasured. Details are in docs/compute-bvh-root-uav.md.
OpenAI Codex assisted with the implementation, tests and documentation.
A descriptor built around a root descriptor's address with unordered access was refused in emit ("a root UAV or typed root view"). With the spill table read (#302, #489), 11 of the 34 compute programs with spilled root arguments that Grand Theft Auto VI's world dispatches stopped there, among them the one dropping the most dispatches per frame in our runs. The translated shader now declares u<slot> in the root-view space (RWByteAddressBuffer, PSV0 kind 7). The host binds it as a one-view table: a raw view with unordered access of the title buffer's host copy from the root address, at most 1 MiB, refreshed before the submission and copied back after it like a table's buffer view. Without a host copy, or off 16 bytes, the view is null. The shader cache stores the new list. Offline over those 34 programs (victory translate --validate --pipelines, RTX 3080, dxil.dll 1.9.2609): 0 emitted before, 7 emitted and validated after, 6 of them with a host pipeline (the seventh is a wave64 program this card refuses). Co-Authored-By: Claude Fable 5.2 <[email protected]>@Zipettte on GitHub · 2026-11-24 18:00 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
bfe5d2d:cargo test -p victory -p victory-gpu -p victory-shaderpasses, 177 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@aycow on GitHub · 2026-11-24 18:13 UTC · original
I tested exact
bfe5d2dusing an original translated compute shader and the production spilled root UAV binding path. The short view and existing 1 MiB edge behaved as expected. An unaligned root address did bind a native null UAV, but its deferred GPU-write bookkeeping still blocked a later CPU refresh on exact #1175 (17 observed, 77 expected). The focused fix and fixture schedule shadow work only when a native view covers complete dwords. AMD, NVIDIA and WARP pass with full GBV. Feel free to take the production hunk into this PR. This leaves the existing extent policy intact; the title producer binding and actual write extent remain unverified.@Marvisak on GitHub · 2026-11-25 00:33 UTC · original
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Draft integration of #1077 plus one test and a design doc (docs/compute-bvh-root-uav.md, against the short-docs rule); the capability is in main (
27c3dc9d).If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed