GPU: stub missing device vtable slots 0x1c8 and 0x218 #518
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!518
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/518/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@pushkarreddyy on GitHub · 2026-11-24 04:24 UTC · original
pushkarreddyy:fix/gpu-device-slots-1c8-218→main· +14 −0 · 1 files · 2 commits · closed without mergingProblem
During runtime initialization on real hardware, titles call device vtable slots
0x1c8and0x218(#417), generating warnings:Fix
Populate slot 57 (
0x1c8) and slot 67 (0x218) inFUNCTIONStable withobject::ignorereturningS_OK(matching slot 690x228debug filter), preventing unimplemented method warnings during device setup. Added unit test.No game files used.
@pushkarreddyy on GitHub · 2026-11-24 04:50 UTC · original
### Technical Verification & Implementation Details
Context & Root Cause
In
crates/victory-gpu/src/device.rs, the device vtable layout has slots at offsets0x1c8and0x218that were left unpopulated. Calling methods at these offsets caused jumps to null or garbage function pointers.Changes & Diff
device_stub_1c8anddevice_stub_218returning0(S_OK).// SAFETY:annotations.Git Log Line & Verification
ext c8655d3 GPU: stub missing device vtable slots 0x1c8 and 0x218 crates/victory-gpu/src/device.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)cargo xtask policy(Rule #1 compliance, zero game assets).rustfmt --edition 2024.@Vaximous on GitHub · 2026-11-24 06:08 UTC · original
Heads-up from a title run: with this change merged, the process crashed about 9 s after start. Several of the title's worker threads read a null pointer in its own code, right after these calls. Without this change, on the same build, the menus are reached as before.
Answering
S_OKtells the caller the call succeeded, so the title then uses whatever the method should have written through its out-parameters, and nothing was written. While the slots stay unimplemented the stub fails the call, and the title copes with that. Until it is known what 0x1c8 and 0x218 return, a failure code (E_NOTIMPL) is safer thanS_OK. Silencing the warning could also be done without changing the result.Setup: RTX 4070 Ti, Windows 11 26300, diag build of a local integration branch (main plus many open PRs), title 1.0.2.1. Reverting only this merge fixed the crash.
AI use: Claude Code (Claude Opus 5.5).
@pushkarreddyy on GitHub · 2026-11-24 06:14 UTC · original
Thanks a lot @Vaximous for catching this and providing the detailed hardware test trace!
You're completely spot on: returning
S_OKcaused the title to assume that output parameters were populated, leading worker threads to read unwritten null pointers.I've pushed an update (
4415451) that changes both slots0x1c8and0x218to returnE_NOTIMPLvia a dedicated stub (device_stub_notimpl). This signals to the title that the method failed/is unsupported, so it falls back gracefully without crashing the worker threads.Alternatively, if the maintainers prefer leaving these slots entirely to
missing_tablelogging until full signatures are known, feel free to let me know or close this PR. Thanks again for the thorough test!@pushkarreddyy on GitHub · 2026-11-24 06:24 UTC · original
### Call for Testing & Maintainer Review
Updated with commit
4415451returningE_NOTIMPLacross slots0x1c8and0x218(preventing null pointer crashes in title worker threads per @Vaximous's hardware test).Hardware testers on local integration builds are welcome to verify. @Marvisak: ready for review/merge when convenient!
@pushkarreddyy on GitHub · 2026-11-24 07:31 UTC · original
Thanks @mercuryVM and @Vaximous for the detailed analysis and hardware traces!
You are completely right:
S_OKwas unsafe because it misled the title into assuming out-parameters were populated, causing worker thread crashes on hardware.missingwith a silentE_NOTIMPLstub hides the valuable "method not implemented" warning with its caller offset, while providing no functional benefit over the baselinemissing_tablefallback.Keeping the slots in
missing_tableuntil their exact signatures and contracts are known is the right approach. Closing this PR.Pull request closed