GPU: invalidate root bindings when a root signature changes #1447

Open
Luizbc2 wants to merge 2 commits from upstream-pr/1448 into main
Luizbc2 commented 2026-11-24 18:05:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Luizbc2 on 2026-11-24T18:05:10Z.


Summary

SetGraphicsRootSignature and SetComputeRootSignature currently route to a no-op. The draw state therefore keeps root tables, views, and constants from an earlier signature. Track both title root signatures and clear only the bindings for the signature that changes. Rebinding the same signature keeps the existing arguments.

This follows D3D12 command-list root-signature semantics. The host root signature used by the translated pipeline is still bound by the existing draw path.

Testing

cargo test --workspace --lib --locked --offline changing_root_signatures_invalidates_only_the_matching_bindings

The test sets a graphics table, root view, and constants alongside compute constants. It confirms that setting the same graphics signature keeps all bindings, changing it clears only graphics bindings, and setting the compute signature to null clears its bindings. Verified locally on Windows against ffe310e.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6588255758 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1448). Originally posted by [Luizbc2](https://github.com/Luizbc2) on 2026-11-24T18:05:10Z. --- ## Summary `SetGraphicsRootSignature` and `SetComputeRootSignature` currently route to a no-op. The draw state therefore keeps root tables, views, and constants from an earlier signature. Track both title root signatures and clear only the bindings for the signature that changes. Rebinding the same signature keeps the existing arguments. This follows [D3D12 command-list root-signature semantics](https://learn.microsoft.com/en-us/windows/win32/direct3d12/using-a-root-signature#command-list-semantic). The host root signature used by the translated pipeline is still bound by the existing draw path. ## Testing `cargo test --workspace --lib --locked --offline changing_root_signatures_invalidates_only_the_matching_bindings` The test sets a graphics table, root view, and constants alongside compute constants. It confirms that setting the same graphics signature keeps all bindings, changing it clears only graphics bindings, and setting the compute signature to null clears its bindings. Verified locally on Windows against `ffe310e`. AI-assisted with Codex.
acetonahard-code commented 2026-11-24 21:03:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by acetonahard-code on 2026-11-24T21:01:52Z.


Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current main (ffe310e):

cargo test -p victory-gpu passed failed ignored
main 50 0 1
main + this PR 51 0 1
main, --all-features 53 0 -
main + this PR, --all-features 54 0 -
  • The new test passes.
  • No GPU test skipped for lack of a device.
  • cargo clippy --all-targets -- -D warnings, with and without --all-features: clean.

I didn't test with game data.


Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7144381973 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1448#issuecomment-7144381973). Originally posted by [acetonahard-code](https://github.com/acetonahard-code) on 2026-11-24T21:01:52Z. --- Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current `main` (ffe310e): | `cargo test -p victory-gpu` | passed | failed | ignored | |---|---|---|---| | `main` | 50 | 0 | 1 | | `main` + this PR | 51 | 0 | 1 | | `main`, `--all-features` | 53 | 0 | - | | `main` + this PR, `--all-features` | 54 | 0 | - | - The new test passes. - No GPU test skipped for lack of a device. - `cargo clippy --all-targets -- -D warnings`, with and without `--all-features`: clean. I didn't test with game data. --- <sub>Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.</sub>
Marvisak commented 2026-11-25 02:06:05 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-gpu/src/draw.rs, crates/victory-gpu/src/list.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149587952 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1448#issuecomment-7149587952). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:28:33Z. --- <!-- victory-triage v1 head=a2700be147954e82c06c89c2beeb9f0d6d22952a verdict=needs-rebase at=2026-11-25T01:28:31Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-gpu/src/draw.rs`, `crates/victory-gpu/src/list.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1448:upstream-pr/1448'
git switch 'upstream-pr/1448'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1448'
git switch 'upstream-pr/1448'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1448'
git switch 'upstream-pr/1448'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1448'
git switch 'main'
git merge --squash 'upstream-pr/1448'
git switch 'main'
git merge --ff-only 'upstream-pr/1448'
git switch 'main'
git merge 'upstream-pr/1448'
git push origin 'main'
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!1447
No description provided.