GPU: a method that is not implemented logs its four argument registers (port of Marvisak#1839) #677

Manually merged
github merged 1 commit from github-bot/gh-677 into main 2026-11-29 08:21:54 +00:00 AGit
Owner

@⁠kibagami-nc on GitHub · 2026-11-28 03:24 UTC · original
kibagami-nc:fix/unimplemented-methods-log-arguments → main · +31 −3 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC

What

The stub behind every slot a method 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. To tell which console method a slot is, reporters had to patch it locally to log rcx/rdx/r8/r9: an interface GUID or a module address reads differently from flags, a count or an out pointer. That matters for slots such as the device methods 0x218 and 0x1c8 reported in #587.

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

The values above only show the line's shape.

  • The stack is never read: on win64 all four arguments are registers, so reading them never touches the caller's stack.
  • Fewer arguments: a call made with fewer real arguments shows whatever those registers held.
  • Nothing else changes: the tables, the once-per-slot report and the E_NOTIMPL return are as before.

This is a port of pablogonz12's change (Marvisak/VIctory#1839, refs Marvisak/VIctory#829). It applied cleanly.

Tests

  • New object::tests::unimplemented_calls_report_their_argument_registers (the text). The object tests: 5 passed, 1 ignored (a benchmark).
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: nothing in object.rs. main's own findings are fixed by #665.

No game files, dumps or extracted data are included.

**@⁠kibagami-nc** on GitHub · 2026-11-28 03:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/677) `kibagami-nc:fix/unimplemented-methods-log-arguments` → `main` · +31 −3 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC ## What The stub behind every slot a method 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. To tell which console method a slot is, reporters had to patch it locally to log `rcx`/`rdx`/`r8`/`r9`: an interface GUID or a module address reads differently from flags, a count or an out pointer. That matters for slots such as the device methods `0x218` and `0x1c8` reported in #587. 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 ``` The values above only show the line's shape. - **The stack is never read:** on win64 all four arguments are registers, so reading them never touches the caller's stack. - **Fewer arguments:** a call made with fewer real arguments shows whatever those registers held. - **Nothing else changes:** the tables, the once-per-slot report and the `E_NOTIMPL` return are as before. This is a port of pablogonz12's change ([Marvisak/VIctory#1839](https://github.com/Marvisak/VIctory/pull/1839), refs Marvisak/VIctory#829). It applied cleanly. ## Tests - New `object::tests::unimplemented_calls_report_their_argument_registers` (the text). The `object` tests: 5 passed, 1 ignored (a benchmark). - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: nothing in `object.rs`. `main`'s own findings are fixed by #665. No game files, dumps or extracted data are included.
The stub behind every slot a method table does not fill (object.rs) logged
the object, the slot and the caller's offset, but not what the call
carried. Telling which console method a slot is (an interface GUID or a
module address, or flags, a count, an out pointer) took a local patch to
log rcx, rdx, r8 and r9.

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. On win64 all
four are registers, so reading them never touches the caller's stack; a
call with fewer real arguments shows whatever those registers held. The
tables, the once-per-slot report and the E_NOTIMPL return are unchanged.

Port of pablogonz12's change (Marvisak/VIctory#1839, refs
Marvisak/VIctory#829), with its test of the text.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 03:25:23 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-28 05:19 UTC · original · approved these changes

LGTM — verified on Windows:

  • cargo test -p victory-gpu --lib object:: passed (5/5, including unimplemented_calls_report_their_argument_registers)
  • 0 new compiler warnings in touched files
  • cargo xtask policy passed (294 files ok)

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-28 05:19 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/677#pullrequestreview-6095978664) · **approved these changes** LGTM — verified on Windows: - `cargo test -p victory-gpu --lib object::` passed (5/5, including `unimplemented_calls_report_their_argument_registers`) - 0 new compiler warnings in touched files - `cargo xtask policy` passed (`294 files ok`) Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
github manually merged commit 67678761b0 into main 2026-11-29 08:21:54 +00:00
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/trustno1-coder--VIctory-NVIDIA!677
No description provided.