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

Merged
kibagami-nc merged 1 commit from upstream-pr/677 into main 2026-11-29 08:16:58 +00:00
kibagami-nc commented 2026-11-28 03:24:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T03:24:48Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5536206739 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/677). Originally posted by [kibagami-nc](https://github.com/kibagami-nc) on 2026-11-28T03:24:48Z. --- ## 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.
Dukestar69 commented 2026-11-28 05:19:02 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-28T05:19:02Z.

Review: APPROVED


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).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review:6095978664 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/677#pullrequestreview-6095978664). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-28T05:19:02Z. **Review:** APPROVED --- 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).
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
trustno1-coder/VIctory-NVIDIA!677
No description provided.