Skip to content

Pr/newer title startup - #142

Closed
gbuyssens wants to merge 6 commits into
xcl-dev:mainfrom
gbuyssens:pr/newer-title-startup
Closed

gbuyssens wants to merge 6 commits into
xcl-dev:mainfrom
gbuyssens:pr/newer-title-startup

Conversation

@gbuyssens

@gbuyssens gbuyssens commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

A 2026 retail build (MicrosoftGame.Config "title memory Advanced") calls
D3D12ConfigureVirtualMemoryX before its device and asserts on the stub's E_NOTIMPL, so it
ended at once. XCL lays out the title's memory itself: the export answers S_OK and logs its
arguments once (first words of the two pointers – the first one holds 0x400000000).
With it the title gets through XGameRuntime initialisation and GameInput, then asserts on an
E_NOINTERFACE nobody logged: XGameRuntime objects' QueryInterface and DirectStorage's query
now log the class and the IID they refuse, as GameInput's and D3D12's already do.

Tested: RTX 3060, the title above (two runs), scripts\test.ps1 <résultat>.

A newer GDK export a title calls before its device, for the console's memory layout
(MicrosoftGame.Config title memory "Advanced"); the first title seen calling it (a 2026
Rockstar build) asserted on the stub's E_NOTIMPL and ended at once. XCL lays out the
title's memory itself, so S_OK; the arguments are logged once.
A title asking for an interface version XCL does not know got E_NOINTERFACE silently and
asserted; the IID and the class are in the log now (as GameInput's and D3D12's already were).
… title asks for

62959d11-d45f-4884-a0a3-f7862ea243ae (its GDK name is not known here) gets the
IDStorageFactoryX object: its extra methods are the vtable's logged stubs, so the first one
the title calls is named instead of the title asserting on E_NOINTERFACE.
…ts, what pointers point at

The thunk hands the tracer its frame (the saved rcx / rdx / r8 / r9, the caller's stack): a
method a title calls with a layout XCL does not expect (a 2026 title crashes inside
GetCustomHeapProperties, xcl-dev#26) is then readable from the log.
…sult pointer in rcx, the device in rdx)

A 2026 title calls device slot xcl-dev#26 with the hidden result pointer first and the device second;
D3D12 took the stack for this and faulted. Both argument orders are answered with the device's
properties.
…her struct-returning device methods take the free-function call too

CreateCommandQueueX with flags 2 (a compute queue of a 2026 title) failed with E_INVALIDARG on
the PC's CreateCommandQueue: only DISABLE_GPU_TIMEOUT (1) is passed on, the rest logged once.
GetResourceAllocationInfo and GetAdapterLuid answer the result-pointer-first call like
GetCustomHeapProperties.
@ivall

ivall commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Closing: most of what this adds is on main since 9add721 (D3D12ConfigureVirtualMemoryX, GetCustomHeapProperties answering the free-function call, refused interfaces logged, the newer DirectStorage factory), and the branch now conflicts in 3 files. If a part is still missing on current main (the dropped queue flags, for example), please send it as a new PR on main. Thanks!

@ivall ivall closed this Nov 23, 2026
Lum7nt added a commit to Lum7nt/xcl that referenced this pull request Nov 23, 2026
… and add console stubs

Scarlett GDK uses subobject type 23 for Amplification Shaders (AS) and 24 for Mesh Shaders (MS), whereas PC Direct3D 12 uses slot 24 for AS and 25 for MS. Console streams passing an MS container in slot 24 previously failed pipeline stream translation as an unsupported AS, returning E_INVALIDARG.

- Disambiguate slot 24 in real.rs and null.rs by checking shader container stage and NGG hardware stage.
- Direct console slot 24 MS containers to mesh shader translation and fallback.
- In fallback_stream, rewrite console slot 24 to PC slot 25 with dummy mesh bytecode so PC drivers accept the SM 6.5 stream.
- Add unit tests for subobject payload and fallback stream rewriting.
- Add console stubs for command list xcl-dev#75, xcl-dev#126, #131, xcl-dev#132, xcl-dev#142, allocator xcl-dev#9, and queue xcl-dev#31 extension.
heretic1321 pushed a commit to heretic1321/xcl that referenced this pull request Nov 23, 2026
… and add console stubs

Scarlett GDK uses subobject type 23 for Amplification Shaders (AS) and 24 for Mesh Shaders (MS), whereas PC Direct3D 12 uses slot 24 for AS and 25 for MS. Console streams passing an MS container in slot 24 previously failed pipeline stream translation as an unsupported AS, returning E_INVALIDARG.

- Disambiguate slot 24 in real.rs and null.rs by checking shader container stage and NGG hardware stage.
- Direct console slot 24 MS containers to mesh shader translation and fallback.
- In fallback_stream, rewrite console slot 24 to PC slot 25 with dummy mesh bytecode so PC drivers accept the SM 6.5 stream.
- Add unit tests for subobject payload and fallback stream rewriting.
- Add console stubs for command list xcl-dev#75, xcl-dev#126, #131, xcl-dev#132, xcl-dev#142, allocator xcl-dev#9, and queue xcl-dev#31 extension.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants