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

Open
github-bot wants to merge 1 commit from github-bot/gh-421 into main AGit
Owner

@⁠GamingRipperDoc on GitHub · 2026-11-25 00:36 UTC · original
GamingRipperDoc:dred-user-data-kinds → main · +22 −6 · 1 files · 1 commits · open

Device-removed reports: say which user data is a table. Ported from upstream Marvisak/VIctory#427 (two approvals there, checked in real reports by a tester).

Why

op_text prints [heap N: …] after every user-data value, whatever the shader does with it. On upstream Marvisak/VIctory#304 that made u13=0x0 [heap 0: … TEXTURE1D …] read as "this mesh draw reads heap slot 0", when u13 is a plain constant (RootType::Constants) in every shader that has it; it took a diagnostic run to find out.

What

Each user-data value is labelled:

u8=0xa12100 table [heap 329992: null]          (a table: the view it starts at)
u13=0x0 const [as heap index 0: Shader(0, …)]   (a constant: the view at that index, labelled as a guess)
u15=0x… host                                    (a word VIctory computes: no view)

The host case is new in this port: this tree's loop also reads host-computed words (RootType::Other, through host_word, e.g. the title-memory base), which are addresses, not heap indices, so they get no view. The tuple is named root, not kind (the upstream review fix), so it doesn't shadow op_text's kind: String. Only diagnostics builds change; one file.

Tested

Windows 10, AMD RX 9070 XT, on main 31714de: cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings clean; rustfmt --check on draw.rs reports the same places as main, none in the changed lines. The upstream version was confirmed in six real device-removed reports on an RX 9070 XT (all values labelled, none in the old form); the host label hasn't appeared in a real report here yet.

No game data used.

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

**@⁠GamingRipperDoc** on GitHub · 2026-11-25 00:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/421) `GamingRipperDoc:dred-user-data-kinds` → `main` · +22 −6 · 1 files · 1 commits · open Device-removed reports: say which user data is a table. Ported from upstream Marvisak/VIctory#427 (two approvals there, checked in real reports by a tester). ## Why `op_text` prints `[heap N: …]` after every user-data value, whatever the shader does with it. On upstream Marvisak/VIctory#304 that made `u13=0x0 [heap 0: … TEXTURE1D …]` read as "this mesh draw reads heap slot 0", when `u13` is a plain constant (`RootType::Constants`) in every shader that has it; it took a diagnostic run to find out. ## What Each user-data value is labelled: ``` u8=0xa12100 table [heap 329992: null] (a table: the view it starts at) u13=0x0 const [as heap index 0: Shader(0, …)] (a constant: the view at that index, labelled as a guess) u15=0x… host (a word VIctory computes: no view) ``` The `host` case is new in this port: this tree's loop also reads host-computed words (`RootType::Other`, through `host_word`, e.g. the title-memory base), which are addresses, not heap indices, so they get no view. The tuple is named `root`, not `kind` (the upstream review fix), so it doesn't shadow `op_text`'s `kind: String`. Only diagnostics builds change; one file. ## Tested Windows 10, AMD RX 9070 XT, on `main` `31714de`: `cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings` clean; `rustfmt --check` on `draw.rs` reports the same places as `main`, none in the changed lines. The upstream version was confirmed in six real device-removed reports on an RX 9070 XT (all values labelled, none in the old form); the `host` label hasn't appeared in a real report here yet. No game data used. AI-assisted (Claude Code); I ran the checks above on my machine.
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.

Ported onto fxceless/victory-fork, where this loop also reads host-computed
words (RootType::Other, through host_word): those are labelled `host` and get
no view, since they are addresses, not heap indices. The tuple is named
`root` (the review fix from Marvisak/VIctory#427, 16d395c) so it does not
shadow the `kind: String` parameter.

(cherry picked from commits 57b8bf5 and 16d395c, Marvisak/VIctory#427)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:43:03 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-421'
git switch 'github-bot/gh-421'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-421'
git switch 'github-bot/gh-421'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-421'
git switch 'main'
git merge --squash 'github-bot/gh-421'
git switch 'main'
git merge --ff-only 'github-bot/gh-421'
git switch 'main'
git merge 'github-bot/gh-421'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.