GPU: include root-selected entries in rebuilt descriptor tables #420

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

@⁠FIocker on GitHub · 2026-11-24 03:10 UTC · original
FIocker:gpu/root-indexed-fresh-tables → main · +442 −25 · 10 files · 2 commits · open

A rebuilt descriptor table stops at the last statically reported resource. A translated shader can select a later entry using a root constant. This keeps selector metadata through translation and the shader cache, resolves supported root-constant forms while binding, and includes those entries in the copied span. Selected buffers are refreshed when the table is built and on cache hits.

With #336 merged, the bind rejects spans past the title heap or the actual dynamic capacity of the bound host heap. Selectors that can only be evaluated during shader execution remain a separate case.

The synthetic GFX10 fixture uses VIctory's compute pipeline and descriptor binding on D3D12 WARP. It reads two buffer sentinels through new and cached tables, checks that the static-only control leaves the later entry unpopulated, and checks that invalid spans fail admission before dispatch. The Windows workspace diagnostics suite passed on WARP. A separate local integration with #334 also verified a UAV write followed by a cached, root-selected SRV read of the same buffer in one command list.

**@⁠FIocker** on GitHub · 2026-11-24 03:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/420) `FIocker:gpu/root-indexed-fresh-tables` → `main` · +442 −25 · 10 files · 2 commits · open A rebuilt descriptor table stops at the last statically reported resource. A translated shader can select a later entry using a root constant. This keeps selector metadata through translation and the shader cache, resolves supported root-constant forms while binding, and includes those entries in the copied span. Selected buffers are refreshed when the table is built and on cache hits. With #336 merged, the bind rejects spans past the title heap or the actual dynamic capacity of the bound host heap. Selectors that can only be evaluated during shader execution remain a separate case. The synthetic GFX10 fixture uses VIctory's compute pipeline and descriptor binding on D3D12 WARP. It reads two buffer sentinels through new and cached tables, checks that the static-only control leaves the later entry unpopulated, and checks that invalid spans fail admission before dispatch. The Windows workspace diagnostics suite passed on WARP. A separate local integration with #334 also verified a UAV write followed by a cached, root-selected SRV read of the same buffer in one command list.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:03:13 +00:00
Author
Owner

@⁠Raxstreams on GitHub · 2026-11-24 04:05 UTC · original

Confirmed the production binding regression test passes in a local integration with draw admission from #336. The translated shader selected the later buffer in the rebuilt table and the GPU readback matched. The combined GPU suite completed with 127 passed and four ignored.

**@⁠Raxstreams** on GitHub · 2026-11-24 04:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/420#issuecomment-7121694329) Confirmed the production binding regression test passes in a local integration with draw admission from #336. The translated shader selected the later buffer in the rebuilt table and the GPU readback matched. The combined GPU suite completed with 127 passed and four ignored.
Author
Owner

@⁠alexdeliu on GitHub · 2026-11-24 17:23 UTC · original

Merged onto main @ ffe310eb, this PR (b4b9498a) no longer compiles its tests: crates/victory-shader/src/emit/waterfall_tests.rs:77 builds a HostShader without the new root_indexed_views field, and crates/victory-gpu/src/descriptor.rs:757 calls resource::track with 3 arguments. Since 6638098c it takes a 4th, lanes: Option<&Structured>; main's tests pass Some(&st) with let st = structure::structure(&p).unwrap();.

Checked with CI's steps (both clippy runs with -D warnings, cargo test --workspace) on Windows 11, AMD RX 9070. Every open PR: https://gist.github.com/alexdeliu/ef9ef0ebc1776ff104b5aa8eaea18e87

**@⁠alexdeliu** on GitHub · 2026-11-24 17:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/420#issuecomment-7139130479) Merged onto `main` @ `ffe310eb`, this PR (`b4b9498a`) no longer compiles its tests: `crates/victory-shader/src/emit/waterfall_tests.rs:77` builds a `HostShader` without the new `root_indexed_views` field, and `crates/victory-gpu/src/descriptor.rs:757` calls `resource::track` with 3 arguments. Since 6638098c it takes a 4th, `lanes: Option<&Structured>`; main's tests pass `Some(&st)` with `let st = structure::structure(&p).unwrap();`. <sub>Checked with CI's steps (both clippy runs with `-D warnings`, `cargo test --workspace`) on Windows 11, AMD RX 9070. Every open PR: https://gist.github.com/alexdeliu/ef9ef0ebc1776ff104b5aa8eaea18e87</sub>
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:16 UTC · original

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-gpu/src/draw.rs, crates/victory-gpu/src/shader_cache.rs, crates/victory-shader/src/emit/host.rs, crates/victory-shader/src/emit/mod.rs, crates/victory-shader/src/emit/valu_tests.rs, crates/victory-shader/src/resource.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/420#issuecomment-7148344155) <!-- victory-triage v1 head=b4b9498abc00f5437b1e870476cbb6607215c3c3 verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `crates/victory-gpu/src/draw.rs`, `crates/victory-gpu/src/shader_cache.rs`, `crates/victory-shader/src/emit/host.rs`, `crates/victory-shader/src/emit/mod.rs`, `crates/victory-shader/src/emit/valu_tests.rs`, `crates/victory-shader/src/resource.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/descriptor.rs
  • crates/victory-gpu/src/draw.rs
  • crates/victory-gpu/src/shader_cache.rs
  • crates/victory-shader/src/emit/host.rs
  • crates/victory-shader/src/emit/mod.rs
  • crates/victory-shader/src/emit/valu_tests.rs
  • crates/victory-shader/src/resource.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-420'
git switch 'github-bot/gh-420'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-420'
git switch 'github-bot/gh-420'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-420'
git switch 'main'
git merge --squash 'github-bot/gh-420'
git switch 'main'
git merge --ff-only 'github-bot/gh-420'
git switch 'main'
git merge 'github-bot/gh-420'
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!420
No description provided.