Repository navigation
xgameruntime: add XAccessibility closed caption and high contrast fallback - #85
Merged
Merged
Conversation
DIMASIK1502
pushed a commit
to DIMASIK1502/xcl
that referenced
this pull request
Nov 23, 2026
…ist layouts Unicorn Overlord runs on a newer console D3D12 runtime from its own game OS. It reports the same SDK version (0x20004) as XDefiant and Minecraft, but some vtables are laid out differently: - Command queue: there are two more methods before Signal. Signal is at xcl-dev#16, Wait xcl-dev#17, GetTimestampFrequency xcl-dev#18, SignalX xcl-dev#25 and PresentX xcl-dev#32. The title's Signal used to land on GetTimestampFrequency, which wrote 100 MHz over the fence's vtable, and the game crashed. queue_dispatch now handles the title's queue slots from xcl-dev#14. A fence passed to xcl-dev#16 or xcl-dev#17 marks the newer layout; the older layout never passes one there. - Command list: the console methods from CopyTextureRegionX onward sit two slots later (xcl-dev#85 instead of xcl-dev#83). The texture uploads used to hit SetPredicationBufferX, so every texture stayed zero and the screen showed only shapes and gradients. guard::make_layout_split now picks the method at each call and leaves the argument registers, xmm ones included, untouched. Also: - Console-only resource state bits (0x100000 on the 4K display target) are masked off when a resource is created. The PC refused the resource and the title threw. - The title commits 2046 of 2048 MB of unified memory at start. XCL's per-draw arena now has its own 64 MB pool at the end of window 0, so draws are no longer skipped. - FENCES is a read-write lock. end_title reads it while the title's threads are suspended, so a suspended reader no longer blocks it. Diagnostics: - XCL_WATCH=rva sets a write watchpoint in the exe; the calling thread is armed at once. - XCL_WATCH_FENCE=n watches the n-th fence. - The log now shows the device's SDK version, console-only interface requests, the title's file opens with their flags, DirectStorage requests, unified-memory use, and (in traces) whether title textures hold data in memory. README: Unicorn Overlord is listed as fully playable. Bink's GPU-assisted mode is no longer listed as missing: it needs no Bink-specific support. Hull, domain and amplification shaders are dropped from the list too, since none of the games use them.
Collaborator
|
Merged. Tested on Windows 11 with an RX 9070 (RDNA4): |
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
The layout entry matches the Windows SDK's d3d12.h (IID, parent List9, SetProgram xcl-dev#84 / DispatchGraph xcl-dev#85 after List9's 84 methods, List11 after it); a console list object passes List10 QueryInterface on to the PC list (itself out when supported, E_NOINTERFACE unchanged when not) and forwards xcl-dev#84 / xcl-dev#85; an adopted PC list gets the List10+ layout while a title's xcl-dev#84 / xcl-dev#85 stay the console methods (CopyResource with flags, SetPredication with a buffer). The GPU test skips when the runtime has no List10. 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
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]>
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.
Summary
Implements offline/fallback support for the GDK
XAccessibilityclosed-caption and high-contrast APIs (XAccessibility.h):crates/xcl/src/hle/xgameruntime/accessibility.rs:#[repr(C, align(4))] XColor(A, R, G, B) and 28-byteXClosedCaptionPropertiesstructs with explicitly zeroed trailing padding.XClosedCaptionGetProperties,XClosedCaptionSetEnabled(takingu8at the FFI boundary to normalize any non-zero C/C++ byte safely without RustboolUB), andXHighContrastGetMode(querying Win32SystemParametersInfoW(SPI_GETHIGHCONTRAST)and classifying active themes viaGetSysColor(COLOR_WINDOW)luminance, returningE_FAILon OS query failure).crates/xcl/src/hle/xgameruntime/mod.rs:XClosedCaptionGetProperties,XClosedCaptionSetEnabled, andXHighContrastGetModeby name inexports().crates/xcl/src/hle/xgameruntime/api.rs:xcl_xaccessibility_object()and wiresNone if c == XACCESSIBILITYinQueryApiImplas a built-in fallback whenSystem32\xgameruntime.dllis not installed (matching the existingXAsyncfallback pattern). When Gaming Services is present on the host,QueryApiImplcontinues to delegate directly to the native PC runtime so host Windows caption settings, custom high-contrast themes, andXSpeech*remain untouched.XGameRuntimeIsFeatureAvailable(0)(XAccessibility) already returnedtrue; this ensures titles queryingXAccessibilitywithoutSystem32\xgameruntime.dllor importing the functions directly do not hitREGDB_E_CLASSNOTREG/ unresolved imports.Testing
XColor/XClosedCaptionPropertiessizes, alignments, field offsets, raw ARGB byte layout, null-pointerE_INVALIDARG, poisoned-buffer zero-padding verification, non-zerou8normalization,XHighContrastModeluma classification & OS query, andxcl_xaccessibility_object()COM vtable dispatch (slots 3..=5 +E_NOTIMPLon slot 6).cargo test -p xcl --lib hle::xgameruntime -- --test-threads=2: 44 passed; 0 failed.