GPU: say in device-removed reports which user data is a table #427

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

@⁠GamingRipperDoc on GitHub · 2026-11-24 03:15 UTC · original
GamingRipperDoc:gpu/dred-user-data-kinds → main · +13 −5 · 1 files · 2 commits · open

The device-removed report (op_text in crates/victory-gpu/src/draw.rs) prints [heap N: …] after every user-data value, constants included. That is easy to misread: on #304 I read u13=0x0 [heap 0: Shader(0, Some([42, 2, …]))] as "this mesh draw reads heap slot 0, a null 1D texture view", and it took a diagnostic run to find that u13 is a constant in all 144 shaders that use it (RootType::Constants), so the slot was unrelated.

Each value now says which it is:

before:  u8=0xa12100 [heap 329992: null] … u13=0x0 [heap 0: Shader(0, …)]
after:   u8=0xa12100 table [heap 329992: null] … u13=0x0 const [as heap index 0: Shader(0, …)]

The view after a constant is kept, labelled as heap index, since a shader with dynamic resources may index the heap with a constant. Only diagnostics builds change; one file, nothing else reads this text.

Checked: cargo build --profile diag -p victory --features diagnostics; cargo clippy -p victory-gpu --features diagnostics --all-targets (one existing warning, in host.rs); cargo test -p victory-gpu 43 passed; rustfmt --check on draw.rs reports the same 4 places as main and none in the changed lines; cargo xtask policy ok. Windows 10, RX 9070 XT.

Not checked: a device removal with this exact build. The root types were confirmed with a local variant that printed u13=0x0(Constants) in a real report (#304, third run); this PR's wording has not appeared in one.

No game data used.

AI-assisted (Claude Code); I ran the checks above on my machine.

🤖 Generated with Claude Code

**@⁠GamingRipperDoc** on GitHub · 2026-11-24 03:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/427) `GamingRipperDoc:gpu/dred-user-data-kinds` → `main` · +13 −5 · 1 files · 2 commits · open The device-removed report (`op_text` in `crates/victory-gpu/src/draw.rs`) prints `[heap N: …]` after every user-data value, constants included. That is easy to misread: on #304 I read `u13=0x0 [heap 0: Shader(0, Some([42, 2, …]))]` as "this mesh draw reads heap slot 0, a null 1D texture view", and it took a diagnostic run to find that `u13` is a constant in all 144 shaders that use it (`RootType::Constants`), so the slot was unrelated. Each value now says which it is: ``` before: u8=0xa12100 [heap 329992: null] … u13=0x0 [heap 0: Shader(0, …)] after: u8=0xa12100 table [heap 329992: null] … u13=0x0 const [as heap index 0: Shader(0, …)] ``` The view after a constant is kept, labelled `as heap index`, since a shader with dynamic resources may index the heap with a constant. Only diagnostics builds change; one file, nothing else reads this text. **Checked:** `cargo build --profile diag -p victory --features diagnostics`; `cargo clippy -p victory-gpu --features diagnostics --all-targets` (one existing warning, in `host.rs`); `cargo test -p victory-gpu` 43 passed; `rustfmt --check` on `draw.rs` reports the same 4 places as `main` and none in the changed lines; `cargo xtask policy` ok. Windows 10, RX 9070 XT. **Not checked:** a device removal with this exact build. The root types were confirmed with a local variant that printed `u13=0x0(Constants)` in a real report (#304, third run); this PR's wording has not appeared in one. No game data used. AI-assisted (Claude Code); I ran the checks above on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The device-removed report printed `[heap N: …]` after every user-data
value, constants included, so a constant 0 next to slot 0's view read as
a draw using slot 0. Each value is now marked `table` or `const`; a table
is followed by `[heap N: …]` as before, a constant by
`[as heap index N: …]`, kept because dynamic resources may index the heap
with one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tuple's `kind` shadowed the function's `kind: String` parameter
(review on #427).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:03:30 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 03:38 UTC · original

Verified 57b8bf5 on Arch Linux x86_64, Windows MSVC release build under Wine 11.22 (victory-gpu, --test-threads=1): 43 passed, 0 failed, 1 ignored.

Not covered: the wording in a real device-removed report (not reproducible on this RADV/vkd3d setup) and title behaviour (no game data).

**@⁠DaviTostes** on GitHub · 2026-11-24 03:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/427#issuecomment-7121289630) Verified `57b8bf5` on **Arch Linux x86_64**, Windows MSVC release build under **Wine 11.22** (`victory-gpu`, `--test-threads=1`): **43 passed, 0 failed, 1 ignored**. Not covered: the wording in a real device-removed report (not reproducible on this RADV/vkd3d setup) and title behaviour (no game data).
Author
Owner

@⁠sennecools on GitHub · 2026-11-24 10:29 UTC · original

Checked in real device-removed reports on an RX 9070 XT (RDNA 4), Windows 11 Pro 26300.

The build was a diag build of main 8e79c80 + this PR at 16d395c. It also included #493 and #537. #537 only changes report text. #493 does not touch op_text's user-data loop. There were six offline runs with VICTORY_D3D12_DRED=1, and each ended in a device removal with breadcrumbs.

  • The new wording appears in all six reports. Each report has 42 to 98 table values and 18 to 44 const values. 12 to 35 of the const values carry a view, shown as [as heap index N: …].
  • No user-data value appears in the old unlabelled form (uN=0x… [heap).
  • cargo build --profile diag -p victory --features diagnostics builds cleanly with the three merged together.

No game data is in this comment.

AI-assisted (Claude Code).

**@⁠sennecools** on GitHub · 2026-11-24 10:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/427#issuecomment-7128846305) Checked in real device-removed reports on an RX 9070 XT (RDNA 4), Windows 11 Pro 26300. The build was a diag build of `main` 8e79c80 + this PR at 16d395c. It also included #493 and #537. #537 only changes report text. #493 does not touch `op_text`'s user-data loop. There were six offline runs with `VICTORY_D3D12_DRED=1`, and each ended in a device removal with breadcrumbs. - The new wording appears in all six reports. Each report has 42 to 98 `table` values and 18 to 44 `const` values. 12 to 35 of the `const` values carry a view, shown as `[as heap index N: …]`. - No user-data value appears in the old unlabelled form (`uN=0x… [heap`). - `cargo build --profile diag -p victory --features diagnostics` builds cleanly with the three merged together. No game data is in this comment. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:17 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.

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:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/427#issuecomment-7148351997) <!-- victory-triage v1 head=16d395ccc0974d634158a404b5cdbb2c0d5760a8 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`. 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/draw.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/427/head:github-bot/gh-427'
git switch 'github-bot/gh-427'

Merge

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