Repository navigation
Launcher: honor configured executable before auto-detection - #31
Merged
Merged
Conversation
Collaborator
|
Merged, thanks. It conflicted with a change on main:
|
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.
Ahmet-Dedeler
added a commit
to Ahmet-Dedeler/xcl
that referenced
this pull request
Nov 23, 2026
…, Bink planes, title textures compared through them The intro video and the front end's images (selector arrows, checkbox ticks, backgrounds) read as zeros: the title places those textures at addresses only the GPU uses and declares their pages with command queue xcl-dev#31, which was a stub. Squashed from the video, icons and integration lanes; one run shows the sign-in bar, the video at 30 fps, complete menus and 0 pipelines refused by D3DMetal. Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Ahmet-Dedeler
added a commit
to Ahmet-Dedeler/xcl
that referenced
this pull request
Nov 23, 2026
… page pool are kept; title textures placed in the GPU's range read their pages where the CPU has them
The method (as a retail game calls it, image +0xf2cc7f: queue vtable +0xf8 = slot 31):
(queue, batch count, batches, page pool address, pages in the pool, 0)
- batches: records of 0x18 bytes { GPU-view address u64, range count u32, ranges pointer at +0x10 }
- ranges: 12 bytes { flags u32 (1 = map, 2 = unmap), pool page u32, page count u32 }, one after
the other from the batch's address; the title writes one map range a page (image +0xf2c6bc)
and one unmap range { 2, 0, n } a run (+0xf2c8ca)
- page pool address: the address the title gave RegisterPagePoolX (device xcl-dev#74, image
+0x1e6c2bb) right after it mapped all the pool's pages there in order
(XMemMapPhysicalPages(pool, n, pages), +0x1e6c295): pool page k is the physical page that was
mapped at pool + k * 64 KiB
- 4th argument: the pool's byte size >> 16 (0x185c0 = the 99,776 pages the title allocates)
Seen over a run (XCL_TRACE_PAGE_VIEWS=1): pool 0xd20000000, batch addresses 0x7440000000 and
up; after 65 calls, in the front end's loading screens, 4,793 pages had been mapped and 952
unmapped, no view mapped twice without an unmap between, none unmapped that showed nothing.
What the console does with it (inferred from the title's code, +0x1e6c110 and +0xf2c560): the
title reserves two ranges of 24 GiB for its resource memory, one PAGE_READWRITE and one with
protection 0x801. Pages are mapped for the CPU in the first with XMemMapPhysicalPagesScatter
and for the GPU in the second with this call, at the same virtual page number; resources are
created at addresses in the second, and the title's texture lock rebases such an address into
the first (+0x5121690). So the GPU's page table for the second range is what this call says.
What XCL does: `gpu_views` keeps GPU-view page -> physical page. The pool page is found by the
address it had in the pool (`kernelx::page_of_view`: a page mapped at a second address is now
remembered by its first, `Away::ghost` - XCL keeps a page at one address at a time).
`title_textures::read_committed` reads pages that are unreadable at a texture's address where
the CPU has the page the view shows.
Verified live (D3DMetal, the retail game): its Bink planes - nine R8 textures at 0x744c400000 ...
0x744f000000, written by the decoder at 0xb6c400000 ... 0xb6f000000 - upload the decoded
picture (with the Bink commit that says when they were written); the loading screens' artwork
shows. Of the 4,793 pages mapped, 4,092 were at GPU address = CPU address + 0x68e0000000 (the
start of the GPU range minus the start of the CPU range) when the call came; 701, at 16 other
distances, were not in the CPU's range then (by the distances the page was still at its place
in the pool, 0xd4b790000 and up): a rule that pairs the two reservations by offset reads
nothing for those. In two runs that ended earlier (33 and 17 calls) all pages were at the one
distance.
Unit tests: kernelx::tests::a_page_is_found_by_an_earlier_view, gpu_views::tests (3).
Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Ahmet-Dedeler
added a commit
to Ahmet-Dedeler/xcl
that referenced
this pull request
Nov 24, 2026
…pings of a page pool are kept; a GPU view's page is read where they show it, else by the pairing A retail game maps its page pool's 64 KiB pages twice: for the CPU with XMemMapPhysicalPagesScatter in one 24 GiB reservation, and for the GPU with command queue xcl-dev#31 of the newer layout in the other (PAGE_NOACCESS | PAGE_GRAPHICS_NOACCESS), where it places its streamed textures and video planes. The method was a logged no-op; the pairing of the two reservations (kernelx::mirrors) reads such a texture at the same offset of the CPU view. That holds for most pages only: in one traced run through the front end 4,092 of 4,793 pages mapped by xcl-dev#31 were at that offset when the call came and 701 were not in the CPU view at all (mapped for the GPU only, from where they were in the pool) – textures over those read zeros (the front end's menu images). The method (queue vtable +0xf8; image +0xf2cc7f): (queue, batch count, batches, page pool address, pages in the pool, 0) - batches: 0x18 bytes { GPU-view address u64, range count u32, ranges pointer at +0x10 } - ranges: 12 bytes { flags u32 (1 = map, 2 = unmap), pool page u32, page count u32 }, one after the other from the batch's address - page pool address: what RegisterPagePoolX (device xcl-dev#74) got, where the title had mapped all the pool's pages in order: pool page k is the physical page that was mapped at pool + k * 64 KiB d3d12x::gpu_views keeps GPU-view page -> physical page. A pool page is found by the address it had in the pool (kernelx::page_of_view: a page mapped at a second address is remembered by its first, Away::ghost – XCL keeps a page at one address at a time), its data where the title last mapped it or at its home (kernelx::page_address). title_textures reads a texture's bytes page by page (TitleMemory, for uploads and for the content comparison): where the queue's mapping shows the page; else at the address itself if a page is mapped there; else at the same offset of the paired CPU view; any other address where it is. Uploads take the title's address (Entry::va); Entry::src stays what is write-watched. The frame-rate line is followed by how the pages of GPU views were found so far (title_textures::view_sources), XCL_TRACE_PAGE_VIEWS=1 counts what the calls ask for. Tests: kernelx::tests::a_page_is_found_by_an_earlier_view, gpu_views::tests (3), title_textures::tests::a_gpu_view_page_is_read_by_the_queues_mapping_before_the_pairing. Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Coldtrain
added a commit
to Coldtrain/xcl
that referenced
this pull request
Nov 24, 2026
rickyfahrez
pushed a commit
to rickyfahrez/xcl
that referenced
this pull request
Nov 24, 2026
…ueue method Still a diagnostic. A title calls queue method xcl-dev#31 (newer layout) ~370 times a run on a queue of its own with a count and a pointer; XCL answers S_OK and does nothing, and the title stops submitting 30 s before it ends. The first 12 calls of such a method are logged with their four arguments and the first 16 words at the second one, each marked as a command list of the title's, a pointer (with what it points at) or a value. Not built and not tested: written on macOS. Assisted-by: Claude Code (Fable 5.2)
Xeltax
added a commit
to Xeltax/xcl
that referenced
this pull request
Nov 24, 2026
…GPU-view page shows Queue method ivall#31 (ivall#29 of the older layout) maps pages of the title's memory into GPU views; it was a stub. Its batches are now decoded and checked against the batch count and the pool, and each 64 KiB page of a GPU view records the pool page it was given and the physical page the title had mapped there (kernelx::mirrors). A bad call records nothing; releasing a view drops its pages. XCL keeps a physical page's data where it was mapped last, and the title maps most streamed pages into the CPU view behind the GPU view too, so `mapped_source` answers where that page is now (`page_now`), else the pool page itself. Each title mapping is remembered per address (Away::title), written once the page is in place and forgotten when the reservation goes; a page freed while its allocation lives is no longer looked for (Away::freed). Nothing reads the record yet: textures are unchanged; the queue logs its counts. (ivall#1031) Co-Authored-By: Claude Opus 5.5 <[email protected]>
kacper-serewis
pushed a commit
to kacper-serewis/xcl
that referenced
this pull request
Nov 24, 2026
…elta A title's xcl-dev#31 is the PC's SetPredication (xcl-dev#55, `console_remap`), but no XCL code ran on it: slot 31 was in neither `console_slots` nor `NEWER_LIST_SLOTS`. XCL places some buffers below the title's address and keeps the difference in `BUFFER_DELTA`; every other PC method that takes a buffer offset adds `buffer_delta(res)` (ResolveQueryData, CopyBufferRegion, CopyTextureRegion, ExecuteIndirect). SetPredication did not, so after ResolveQueryData(heap, BINARY_OCCLUSION, i, 1, buf, off) wrote the predicate at off + delta, SetPredication(buf, off, op) read it at off. `set_predication_x` adds the delta (a null buffer passes through) and is installed at xcl-dev#31. Tests: with a delta of 0x200, xcl-dev#31 at offset 0x10 reaches the PC method at 0x210 (it reached it at 0x10 before), and console slot 31 has the handler. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 449dcb4)
kacper-serewis
pushed a commit
to kacper-serewis/xcl
that referenced
this pull request
Nov 24, 2026
KickoffX and the Wait64 mid-list split close, submit and reset the PC list mid-recording, and set again what the title had set: on the console a kickoff leaves the list's state as it was (`Bindings`). They re-applied predication only from `ListState::predication`, which only xcl-dev#85 SetPredicationBufferX sets; `restore_bindings` had none. So predication set through xcl-dev#31 SetPredication was lost at a kickoff or a split, and the draws after it ran unpredicated. `set_predication_x` records the PC call (buffer, offset with the buffer's delta, operation) in `Bindings` (none for a null buffer) and `restore_bindings` issues it again on direct and compute lists. The last of xcl-dev#31 and xcl-dev#85 is the one in effect, as on the PC list: xcl-dev#31 clears xcl-dev#85's op (its buffer still goes back to COMMON at Close / KickoffX through `pred_in_state`), xcl-dev#85 clears the xcl-dev#31 record, and xcl-dev#85's copy into its predication buffer first disarms a xcl-dev#31 predicate too, so the copy is not predicated away. Test: with a delta of 0x200, after xcl-dev#31 at offset 0x10 a restore issues SetPredication(buf, 0x210, op) on direct and compute lists (none before); none after xcl-dev#31 with a null buffer or xcl-dev#85 with none; xcl-dev#85 after xcl-dev#31 disarms first and leaves only xcl-dev#85's state. Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 6337e42)
CalvyPZ
pushed a commit
to CalvyPZ/xcl
that referenced
this pull request
Nov 24, 2026
…elta A title's xcl-dev#31 is the PC's SetPredication (xcl-dev#55, `console_remap`), but no XCL code ran on it: slot 31 was in neither `console_slots` nor `NEWER_LIST_SLOTS`. XCL places some buffers below the title's address and keeps the difference in `BUFFER_DELTA`; every other PC method that takes a buffer offset adds `buffer_delta(res)` (ResolveQueryData, CopyBufferRegion, CopyTextureRegion, ExecuteIndirect). SetPredication did not, so after ResolveQueryData(heap, BINARY_OCCLUSION, i, 1, buf, off) wrote the predicate at off + delta, SetPredication(buf, off, op) read it at off. `set_predication_x` adds the delta (a null buffer passes through) and is installed at xcl-dev#31. Tests: with a delta of 0x200, xcl-dev#31 at offset 0x10 reaches the PC method at 0x210 (it reached it at 0x10 before), and console slot 31 has the handler. Co-Authored-By: Claude Opus 5.5 <[email protected]>
CalvyPZ
pushed a commit
to CalvyPZ/xcl
that referenced
this pull request
Nov 24, 2026
KickoffX and the Wait64 mid-list split close, submit and reset the PC list mid-recording, and set again what the title had set: on the console a kickoff leaves the list's state as it was (`Bindings`). They re-applied predication only from `ListState::predication`, which only xcl-dev#85 SetPredicationBufferX sets; `restore_bindings` had none. So predication set through xcl-dev#31 SetPredication was lost at a kickoff or a split, and the draws after it ran unpredicated. `set_predication_x` records the PC call (buffer, offset with the buffer's delta, operation) in `Bindings` (none for a null buffer) and `restore_bindings` issues it again on direct and compute lists. The last of xcl-dev#31 and xcl-dev#85 is the one in effect, as on the PC list: xcl-dev#31 clears xcl-dev#85's op (its buffer still goes back to COMMON at Close / KickoffX through `pred_in_state`), xcl-dev#85 clears the xcl-dev#31 record, and xcl-dev#85's copy into its predication buffer first disarms a xcl-dev#31 predicate too, so the copy is not predicated away. Test: with a delta of 0x200, after xcl-dev#31 at offset 0x10 a restore issues SetPredication(buf, 0x210, op) on direct and compute lists (none before); none after xcl-dev#31 with a null buffer or xcl-dev#85 with none; xcl-dev#85 after xcl-dev#31 disarms first and leaves only xcl-dev#85's state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
emirduran707
added a commit
to emirduran707/xcl
that referenced
this pull request
Nov 25, 2026
…elta A title's xcl-dev#31 is the PC's SetPredication (xcl-dev#55, `console_remap`), but no XCL code ran on it: slot 31 was in neither `console_slots` nor `NEWER_LIST_SLOTS`. XCL places some buffers below the title's address and keeps the difference in `BUFFER_DELTA`; every other PC method that takes a buffer offset adds `buffer_delta(res)` (ResolveQueryData, CopyBufferRegion, CopyTextureRegion, ExecuteIndirect). SetPredication did not, so after ResolveQueryData(heap, BINARY_OCCLUSION, i, 1, buf, off) wrote the predicate at off + delta, SetPredication(buf, off, op) read it at off. `set_predication_x` adds the delta (a null buffer passes through) and is installed at xcl-dev#31. Tests: with a delta of 0x200, xcl-dev#31 at offset 0x10 reaches the PC method at 0x210 (it reached it at 0x10 before), and console slot 31 has the handler. Co-Authored-By: Claude Opus 5.5 <[email protected]>
emirduran707
added a commit
to emirduran707/xcl
that referenced
this pull request
Nov 25, 2026
KickoffX and the Wait64 mid-list split close, submit and reset the PC list mid-recording, and set again what the title had set: on the console a kickoff leaves the list's state as it was (`Bindings`). They re-applied predication only from `ListState::predication`, which only xcl-dev#85 SetPredicationBufferX sets; `restore_bindings` had none. So predication set through xcl-dev#31 SetPredication was lost at a kickoff or a split, and the draws after it ran unpredicated. `set_predication_x` records the PC call (buffer, offset with the buffer's delta, operation) in `Bindings` (none for a null buffer) and `restore_bindings` issues it again on direct and compute lists. The last of xcl-dev#31 and xcl-dev#85 is the one in effect, as on the PC list: xcl-dev#31 clears xcl-dev#85's op (its buffer still goes back to COMMON at Close / KickoffX through `pred_in_state`), xcl-dev#85 clears the xcl-dev#31 record, and xcl-dev#85's copy into its predication buffer first disarms a xcl-dev#31 predicate too, so the copy is not predicated away. Test: with a delta of 0x200, after xcl-dev#31 at offset 0x10 a restore issues SetPredication(buf, 0x210, op) on direct and compute lists (none before); none after xcl-dev#31 with a null buffer or xcl-dev#85 with none; xcl-dev#85 after xcl-dev#31 disarms first and leaves only xcl-dev#85's state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
theaustinayers
added a commit
to theaustinayers/xcl
that referenced
this pull request
Nov 25, 2026
The queue's CopyPageMappingsBatchX (xcl-dev#29 of the older layout, xcl-dev#31 in the newer one) maps pages of the title's pool into GPU views; it is a stub here. Its arguments are decoded apart from what is done with them, so the record that follows takes a checked list. mirrors::decode_batches turns one call into (GPU-view page, pool page or None for unmapped) in the call's order: batches of 24 bytes (first destination, number of ranges, pointer to them), ranges of three u32 (kind 0: consecutive pool pages, 1: one pool page repeated, 2: unmapped, 3: left as they are; start; count). The whole call is checked before anything is returned: an unreadable batch or range, a range leaving the pool, an unknown kind or more than 1 << 20 pages refuse it. No lock. Not called yet; mirrors::PAGE names the 64 KiB page. Tested: cargo check -p xcl --tests (no new warnings); cargo test --release -p xcl --lib hle::kernelx: 53 passed, 0 failed, 1 ignored, including the new the_page_mapping_batches_are_decoded_whole. Builds on xcl-dev#1055 by Xeltax (f532d33): the decoding, its checks, the Batch test helper and the cases of the test. Builds on xcl-dev#2308 by adiologydev (31fe59c): the decoding split from the record. The batch layout is a fact xcl-dev#1055 cites; no code from elsewhere. Co-Authored-By: Claude Opus 5.5 <[email protected]>
theaustinayers
added a commit
to theaustinayers/xcl
that referenced
this pull request
Nov 25, 2026
…dev#1031) Queue method xcl-dev#29 (xcl-dev#31 in the newer layout) is how a title maps the pages its texture streaming fills into the GPU views its textures are in. It was a stub: every mapping was dropped, a GPU-view page kept showing its CPU view at the same offset, and streamed textures uploaded as zeros. Its arm now goes to q_copy_page_mappings, which hands the call to kernelx::mirrors::apply_batches (the record, the tiles, the textures and the writes of the commits before this one) and sums what it did. A call the decoder refuses records nothing and logs one warning. The result is S_OK either way, as the stub's was. The fifth argument does not reach queue_dispatch and is ignored. This is the only commit of the series that changes what a title sees. XCL_PAGE_MAPPINGS=0 (mirrors::page_mappings, parsed by the pure page_mappings_on) leaves slot 29 to the stub and logs that once; the record then stays empty and every new path is behind one atomic load. README names the switch. Tested: the_queue_page_mapping_method_records_and_can_be_switched_off (new): a call over a pair of views of the test's own records a named pool page with no page and an unmapped page as showing nothing, leaves an untouched page on its CPU view, and returns S_OK; a call with a range of an unknown kind records nothing and returns S_OK; the switch parses. Modules queue_tests + hle::kernelx: 61 passed, 0 failed, 1 ignored (release, software adapter). Builds on xcl-dev#1055 by Xeltax (f532d33): the queue arm, the totals and the warning text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
theaustinayers
added a commit
to theaustinayers/xcl
that referenced
this pull request
Nov 25, 2026
…gsBatchX maps pages into GPU views) Twenty commits: the fourteen of the plan (kernelx keeps the page the title mapped at an address, decodes the method's batches, records which physical page each GPU-view page shows and follows it when it moves; the tiles of a GPU view and the textures over it show and read the pages mapped there; queue method xcl-dev#29 / xcl-dev#31 does it, XCL_PAGE_MAPPINGS=0 for the stub) and six from two reviews (a page that leaves plain memory has its tiles linked again, a released block of unified memory leaves no shown page, the queue of tiles to link again is bounded, XCL's own writes where a page is kept are known writes, GPU writes are noted per list only while the mappings are on, the tests own their pairs and report skips). No conflicts with the depth-buffer registry, the fold bound, the safe texture read or the trace and device-removal lines on world-main. Left by the reviews, not fixed: a release runs forget_mirrors on the title thread (a cost, to be measured); a free and a GPU write of the same call number are ordered by the call, not by the change. The race of an upload with the title unmapping the texture's pages is not closed here: XCL_TEXTURE_SAFE_READ=1 stays the workaround. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Loads the title’s
xcl.tomlbefore choosing a game executable. A validexeoverride can now select the game in a folder with several candidates or a stale manifest entry. The launcher still rejects XCL itself as an override and can fall back to the existing selection rules.Validation