Skip to content

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

Open
FIocker wants to merge 2 commits into
Marvisak:mainfrom
FIocker:gpu/root-indexed-fresh-tables
Open

FIocker wants to merge 2 commits into
Marvisak:mainfrom
FIocker:gpu/root-indexed-fresh-tables

Conversation

@FIocker

@FIocker FIocker commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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.

@Raxstreams

Copy link
Copy Markdown

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.

@alexdeliu

Copy link
Copy Markdown
Contributor

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 6638098 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

Copy link
Copy Markdown
Owner

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

geiyiliyabumo pushed a commit to geiyiliyabumo/VIctory that referenced this pull request Nov 25, 2026
Covers connect validation, activation, Opus decode clamping and planar
output, mono/downmix, bad buffers and packets, reset, result ordering and
identity echo, per-stream queue depth, rejected-command accounting, null
arguments and the result event. Tests only; packets are encoded at test
time from a synthetic tone.

Closes Marvisak#420

Co-authored-by: JMAN730 <JMAN730@users.noreply.github.com>
geiyiliyabumo pushed a commit to geiyiliyabumo/VIctory that referenced this pull request Nov 25, 2026
…s-420-111a

HLE: expand synthetic apu unit tests (Marvisak#420)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants