Shaders: verify compute writes through a spilled root UAV #1175

Closed
Castyan wants to merge 6 commits from upstream-pr/1175 into main
Castyan commented 2026-11-24 16:20:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Castyan on 2026-11-24T16:20:12Z.


Draft 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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586356698 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1175). Originally posted by [Castyan](https://github.com/Castyan) on 2026-11-24T16:20:12Z. --- Draft 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.
Zipettte commented 2026-11-24 18:06:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:00:46Z.


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-shader passes, 177 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140029045 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1175#issuecomment-7140029045). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:00:46Z. --- 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-shader` passes, 177 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
aycow commented 2026-11-24 19:04:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by aycow on 2026-11-24T18:13:31Z.


I tested exact bfe5d2d using 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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140337887 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1175#issuecomment-7140337887). Originally posted by [aycow](https://github.com/aycow) on 2026-11-24T18:13:31Z. --- I tested exact bfe5d2d using 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](https://github.com/aycow/VIctory/blob/c9b515d/docs/spilled-root-uav-fixture.md) 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.
upstream-sync closed this pull request 2026-11-25 01:05:49 +00:00
Marvisak commented 2026-11-25 01:08:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:33:48Z.


Automated triage for the maintainers. Closing because this change is already in main, or main has 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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148640514 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1175#issuecomment-7148640514). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:33:48Z. --- Automated triage for the maintainers. Closing because this change is already in `main`, or `main` has 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

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1175
No description provided.