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

Manually merged
github merged 1 commit from gh-pr/1839/head into gh-pr/1839/base 2026-11-26 04:46:18 +00:00
Owner

@⁠pablogonz12 on GitHub · 2026-11-24 23:11 UTC · original
pablogonz12:fix/829-missing-args → main · +31 −3 · 1 files · 1 commits · merged 2026-11-25 21:51 UTC

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

**@⁠pablogonz12** on GitHub · 2026-11-24 23:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/1839) `pablogonz12:fix/829-missing-args` → `main` · +31 −3 · 1 files · 1 commits · merged 2026-11-25 21:51 UTC 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)
The stub that answers a slot a table does not fill reported only the
object kind, the slot and the caller's offset. Two reporters (#829 and
the #417 thread) had to patch it locally, logging rcx/rdx/r8/r9, to tell
what the call carried; one of them asked for it upstream.

The stub now takes the receiver and the next three registers and logs
them as `args=` alongside the rest, once per slot as before. On win64 all
four are registers, so reading them never touches the caller's stack,
and a call made with fewer real arguments only shows whatever its
registers held. That is enough to tell a call passing an interface GUID
or a module address from one passing flags, a count or an out pointer
without rebuilding with a local patch.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:46:17 +00:00
github manually merged commit e6397f594b into gh-pr/1839/base 2026-11-26 04:46:18 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 07:25 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 07:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/1839#issuecomment-7155840897) <!-- 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)_
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!1839
No description provided.