Skip to content

Method tables with no room after their last method get slots that log - #942

Open
wildheathen wants to merge 3 commits into
trustno1-coder:mainfrom
wildheathen:table-margins
Open

wildheathen wants to merge 3 commits into
trustno1-coder:mainfrom
wildheathen:table-margins

Conversation

@wildheathen

@wildheathen wildheathen commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

The method tables the layer hands the title are made longer than the interfaces we know, "so that a method a newer title adds logs instead of jumping into whatever follows the table" (object.rs). About thirty tables had no such room: the command queue (0 slots after its last method in the newer layout, 2 in the older), the DXGI factory, and nearly every runtime object in victory-hle (saves, user, store, package, networking, input, speech, display, audio, media, the texture computer). A call to the next method jumped into whatever lay after the table.

Each of them now has 8 more slots after the last one it had. A spare slot logs its slot and answers as the unwritten slots of that table already do: E_NOTIMPL where they answer that, 0 for the input reading object, whose methods return counts and booleans. No method that was there changes, nor what it returns.

Tests

One test a table (29 in all): the 8 slots after the table's former end are there, not null, and distinct. They failed before the change. After merging main at 77df871e: cargo test -p victory-gpu 553 passed, 0 failed; cargo test -p victory-hle 225 passed.

Measured

A 3-minute scripted run from the start into the world (RTX 5080, diagnostics build): the game runs as before and none of the new slots is called, so nothing changes for this stretch of this title. It is for other scenes and other titles.

Limits

A call past the end of a method table jumped to whatever followed the table
in memory. Such a call is now logged with its slot and answered E_NOTIMPL.

Every table the title is handed that had fewer than 8 entries after its last
known method gets at least 8: the command queue's two (the newer one ended at
its last method) and the DXGI factory's; the runtime objects', through a
`with_spare` over the existing `missing`; GameInput's input, device and
reading objects, through its `unsupported`; and the texture computer's, the
audio coprocessor's and the source resolver's, which each get a logging entry
of their own. The methods that were there are unchanged. One test per table.
…unted from the table's end

The eight spare entries are counted after the last entry a table had before
they were added, the `missing` ones included, not after its last written
method: the DXGI factory's and the queues' (44, not 48), DirectStorage's
factory and file (24 and 16), the task queue's (39), the shell's off Windows
(12) and GameInput's device (29, since 0x78..=0xa0 are known methods).

GameInput's reading object returns bools, counts and values, never a result
code, so its spare entries log and answer 0 like its unwritten ones. Its three
objects' entries say which object they belong to.

The tests check the entries the table really gained, that none is null and
that they differ; the GPU one compares them with the table of `missing`
entries instead of calling them, which left the reported-once state set.
@wildheathen wildheathen changed the title Method tables with no room after their last method get slots that log [pr-fix] Method tables with no room after their last method get slots that log Nov 28, 2026
@github-actions github-actions Bot added the pr-fix Pull request: fixes a bug label Nov 28, 2026
@github-actions github-actions Bot changed the title [pr-fix] Method tables with no room after their last method get slots that log Method tables with no room after their last method get slots that log Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-fix Pull request: fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant