GPU: an unimplemented method logs the four argument registers #1837

Merged
pablogonz12 merged 1 commit from upstream-pr/1839 into main 2026-11-25 21:51:57 +00:00
pablogonz12 commented 2026-11-24 23:11:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pablogonz12 on 2026-11-24T23:11:17Z.


Refs #829 (the ask two reporters made there, and in the #417 thread).

What

The stub behind every slot a table does not fill (crates/victory-gpu/src/object.rs) logged the object kind, the slot and the caller's offset. It could not say what the call carried, which is what #829 asked for: two reporters on two platforms patched it locally to log rcx/rdx/r8/r9 to tell which console method a slot is.

The stub now takes the receiver and the next three argument registers and logs them as args= in the same line, still once per slot:

WARN victory_gpu::object: method not implemented object="device" slot=0x218 caller="+0x24800db" args=0x14061ab00 0xd469b46b8 0x6ffff8c006b8 0xffbdcc8

(Those values are the ones #829 measured, used here as an example of the line's shape only.)

On win64 all four arguments are registers, so reading them never touches the caller's stack; a call made with fewer real arguments shows whatever those registers held, which is the same thing a local patch shows today. Nothing else changes: the tables, the once-per-slot reporting and the E_NOTIMPL return are as before.

This does not fix the #829 crash (that turned out to be the builtin dxgi, see the reporter's own follow-up); it removes the need to rebuild with a local patch before a missing-slot report can be read.

Why

Every "method not implemented" line in an issue today names a slot and a caller offset but not the arguments, so identifying the method needs another round trip with an instrumented build. With the registers in the line, a GUID pointer (a module address) is visibly different from flags, a count or an out pointer.

Tested with

  • cargo xwin clippy --workspace --all-targets --target x86_64-pc-windows-msvc -- -D warnings: clean
  • cargo xwin clippy --workspace --all-targets --all-features --target x86_64-pc-windows-msvc -- -D warnings: clean
  • cargo xwin test -p victory-gpu --lib --target x86_64-pc-windows-msvc run under Wine 11.0 (vkd3d-proton, RADV, RX 9070 XT): 79 passed, 0 failed, 1 ignored (80 tests; origin/main is 79 with 0 of the new ones) — the new object::tests::unimplemented_calls_report_their_argument_registers passes, plus the existing guids_round_trip_through_text
  • cargo test -p xtask policy: 4 passed
  • rustfmt --edition 2024 --check crates/victory-gpu/src/object.rs: clean

Not tested

  • No title run: no method not implemented slot fires in this change's unit tests, so the new field is verified on the formatting function, not on a live slot line. The register plumbing is the same ABI the local patches in #829 used.
  • 32-bit hosts are not a target of this tree; on x86 the last arguments would be stack slots and the line would show register leftovers.

AI-assisted (Claude); measurements and commands above are from this machine.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6593284021 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1839). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-24T23:11:17Z. --- Refs #829 (the ask two reporters made there, and in the #417 thread). ## What The stub behind every slot a table does not fill (`crates/victory-gpu/src/object.rs`) logged the object kind, the slot and the caller's offset. It could not say *what the call carried*, which is what #829 asked for: two reporters on two platforms patched it locally to log `rcx/rdx/r8/r9` to tell which console method a slot is. The stub now takes the receiver and the next three argument registers and logs them as `args=` in the same line, still once per slot: ``` WARN victory_gpu::object: method not implemented object="device" slot=0x218 caller="+0x24800db" args=0x14061ab00 0xd469b46b8 0x6ffff8c006b8 0xffbdcc8 ``` (Those values are the ones #829 measured, used here as an example of the line's shape only.) On win64 all four arguments are registers, so reading them never touches the caller's stack; a call made with fewer real arguments shows whatever those registers held, which is the same thing a local patch shows today. Nothing else changes: the tables, the once-per-slot reporting and the `E_NOTIMPL` return are as before. This does not fix the #829 crash (that turned out to be the builtin dxgi, see the reporter's own follow-up); it removes the need to rebuild with a local patch before a missing-slot report can be read. ## Why Every "method not implemented" line in an issue today names a slot and a caller offset but not the arguments, so identifying the method needs another round trip with an instrumented build. With the registers in the line, a GUID pointer (a module address) is visibly different from flags, a count or an out pointer. ## Tested with - `cargo xwin clippy --workspace --all-targets --target x86_64-pc-windows-msvc -- -D warnings`: clean - `cargo xwin clippy --workspace --all-targets --all-features --target x86_64-pc-windows-msvc -- -D warnings`: clean - `cargo xwin test -p victory-gpu --lib --target x86_64-pc-windows-msvc` run under Wine 11.0 (vkd3d-proton, RADV, RX 9070 XT): **79 passed, 0 failed, 1 ignored** (80 tests; origin/main is 79 with 0 of the new ones) — the new `object::tests::unimplemented_calls_report_their_argument_registers` passes, plus the existing `guids_round_trip_through_text` - `cargo test -p xtask policy`: 4 passed - `rustfmt --edition 2024 --check crates/victory-gpu/src/object.rs`: clean ## Not tested - No title run: no `method not implemented` slot fires in this change's unit tests, so the new field is verified on the formatting function, not on a live slot line. The register plumbing is the same ABI the local patches in #829 used. - 32-bit hosts are not a target of this tree; on x86 the last arguments would be stack slots and the line would show register leftovers. AI-assisted (Claude); measurements and commands above are from this machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
catminou4 commented 2026-11-25 00:06:23 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:47:38Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

Unimplemented D3D12 method logs the four argument registers: debug diagnostics for unimplemented paths — helps future bring-up. Small.

<!-- greyfinch-sync:Marvisak/VIctory:review:6049281860 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1839#pullrequestreview-6049281860). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:47:38Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. Unimplemented D3D12 method logs the four argument registers: debug diagnostics for unimplemented paths — helps future bring-up. Small.
Marvisak commented 2026-11-25 08:06:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T07:25:18Z.


Automated triage for the maintainers.

The missing::<KIND, SLOT> stub in crates/victory-gpu/src/object.rs now takes the four win64 argument registers (this plus three usize) and adds them as args= to the once-per-slot "method not implemented" warning. On x64 all four are registers, so declaring them is harmless even for calls with fewer real arguments; caller() still skips the same two frames, and the E_NOTIMPL return and once-per-slot reporting stay as they were. This is a small diagnostic gain that saves a rebuild when a missing slot gets reported. The new test only checks the format! helper, so it adds little. CI: not run on this head.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155840897 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1839#issuecomment-7155840897). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T07:25:18Z. --- <!-- victory-triage v1 head=e6397f594b28fcd34cfba386ca5e7424119dd6be verdict=merge-candidate at=2026-11-25T07:25:18Z --> Automated triage for the maintainers. The `missing::<KIND, SLOT>` stub in `crates/victory-gpu/src/object.rs` now takes the four win64 argument registers (`this` plus three `usize`) and adds them as `args=` to the once-per-slot "method not implemented" warning. On x64 all four are registers, so declaring them is harmless even for calls with fewer real arguments; `caller()` still skips the same two frames, and the `E_NOTIMPL` return and once-per-slot reporting stay as they were. This is a small diagnostic gain that saves a rebuild when a missing slot gets reported. The new test only checks the `format!` helper, so it adds little. CI: not run on this head. --- _Generated by [Claude Code](https://claude.ai/code)_
upstream-sync closed this pull request 2026-11-25 22:03:12 +00:00
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!1837
No description provided.