Repository navigation
Conversation
Shim-owned modules (xgameruntime, gameinput, d3d12_xs, xmem) no longer bind to their real System32 namesakes in resolve() or forwarded exports — an unregistered console import now ends unimplemented instead of reaching a host Gaming Services call. LoadLibrary's file-name rule keys imports so "TestShim", "testshim.dll." and "testshim.dll" hit the same shim. registry gains the ordinal classes: gameinput ItsNotRexed#1 and xaudio2_9 (ItsNotRexed#1, and host-only ItsNotRexed#8-ItsNotRexed#10) classify as HResult. GetModuleHandle(nullptr) answers with the mapped main image and GetModuleFileNameA/W answer for bundled modules' stored paths (Win32 spelling, Z: under Wine) through two new BundledModuleOps. loader_test pins the name-rule binding; unimplemented_policy_test pins the ordinal classes. Split from ItsNotRexed#2490 (first of three). AI-assisted. Tested on the build host under Wine/clang-cl: loader_test 88/0, unimplemented_policy_test 96/0. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 3362ef8)
gertify's check on ItsNotRexed#5731 showed no check line names module identity: the ops behind GetModuleHandle(nullptr) and GetModuleFileName were only covered indirectly. A load() now verifies the main-module op answers the first mapped image and module_path answers the main image's and the module's own stored path. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit eec5b68)
console_libraries.md linked d3d12_xs_console_abi.md, which lands with the console-ABI slice — d3d12_command_objects.md already covers the PresentX surface, so test_docs_links is green again (Kam471's blocker). The unregistered-import-of-an-owned-module path now has a check: version.dll is claimed in the test table, so an import of the real GetFileVersionInfoSizeA export must end unimplemented rather than bind the host copy — the same skip Kam471 probed by hand, made a check. loader_test: 90 checks, 0 failed under Wine/clang-cl. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 178fdb8)
gameinput.cpp only compiles when SDL3 is available, so without the shim gameinput.dll has no registry entries, is not owns_dll, and its imports bind the host DLL or end unimplemented like any unserved name (Kam471's review on ItsNotRexed#5731). xgameruntime.dll's GameInputCreate entry is conditional the same way. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 2e0f1a2)
libHttpClient.GDK.dll and XCurl.dll reach the GDK runtime through
xgameruntime.lib's thunks: LoadLibraryW("xgameruntime.dll"), then
GetProcAddress of InitializeApiImpl, InitializeApiImplEx,
InitializeApiImplEx2, QueryApiImpl, UninitializeApiImpl and XErrorReport.
The shims served only the first five. Without XErrorReport the thunks
refuse the runtime before they call any initializer: under gta6rt --run,
HCInitialize returned 0x89240101 (E_GAMERUNTIME_DLL_NOT_FOUND) and
curl_global_init returned CURLE_FAILED_INIT.
XErrorReport is now served by the function behind IXErrorImpl slot 3, so
a report reaches the XErrorSetCallback callback either way.
xgameruntime_test and the tiny_gdk_load fixture check all six names and
that a report through the export reaches the callback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit efd4167)
…le's larger structure A retail console title asks for D3D12_OPTIONS with 0x40 bytes where the PC structure is 0x3C and stops on E_INVALIDARG (measured by the XCL project; GTA VI is not measured). A size above the PC structure now gets the PC fields, every byte after them zeroed and S_OK, in the Vulkan device and in the Xbox-ABI proxy's device slot 13 over a PC runtime (WARP refuses 0x40, which device_proxy_test prints). A smaller size and every other feature keep the exact-size rule: no other console size is measured, and a console structure may carry input fields that zeros would answer wrongly (shims/d3d12_console_feature.h). The first such call logs its size. Tests: one shared check (test/d3d12_options_size_check.h) runs on the raw Vulkan device, the proxy over it, the standalone Vulkan device and the proxy over WARP: 0x3C, 0x3D, 0x40 with a 0xCD-filled buffer, 0x44, 0x80, 0x1000 and 0x10000 (guard bytes after the structure untouched), smaller sizes and no buffer refused, other features still E_INVALIDARG. device_proxy_test also calls slot 13 with garbage in the upper halves of the 32-bit arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 6ec9d70)
There is no VK_EXT_shader_stencil_export path in the layer. Native D3D12 on the RTX 5070 Ti answers 0, and no shader in the 26,503-shader corpus sets STENCIL_REF. Assert the answer in d3d12_vulkan_device_test. Tests: d3d12_vulkan_device (RTX 5070 Ti): 46 feature queries compared, 0 mismatches, exit 0. (cherry picked from commit 368ae64)
…h (D3D-29) The device enables VK_EXT_mesh_shader (meshShader) where the GPU has it and reports MeshShaderTier 1 only then. ID3D12Device2::CreatePipelineState parses pipeline state streams in the d3dx12.h layout into the descriptions the existing PSO creators take, with the runtime's defaults for missing subobjects. Streams the PC runtime refuses are E_INVALIDARG; AS, depth bounds, split stencil masks and view instancing are E_NOTIMPL with a log. A mesh PSO is MS + PS with no vertex input or input assembly, and no dynamic topology or strides. Its output sizes and workgroup are checked against VkPhysicalDeviceMeshShaderPropertiesEXT. DispatchMesh records a Draw with mesh set and replays as vkCmdDrawMeshTasksEXT; a draw of the wrong kind for its pipeline fails with ReplayResult::invalid_draw. d3d12_mesh_test covers the refusals and checks a 2x2x1 and a 1x1x2 mesh grid plus a VS PSO from a stream, pixel by pixel. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit e18b26b)
…ates; mesh test skips without Vulkan The stream parser keyed its duplicate check on the raw subobject type, so DEPTH_STENCIL with DEPTH_STENCIL1 (either order) or RASTERIZER with RASTERIZER2 was accepted; D3D12_PIPELINE_STATE_STREAM_DESC counts versions of one subobject as the same one. The check now uses the base type, while the payload still follows the original type. d3d12_mesh_test covers both mixed orders, RASTERIZER + RASTERIZER2, and each description alone. Reported by Vonsek in review. d3d12_mesh_test failed on a machine without a Vulkan device (the Windows CI runner) instead of exiting 77; it now skips there like d3d12_draw_test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c237639)
…icky E_FAIL VulkanSwapchain::present() treated VK_ERROR_OUT_OF_DATE_KHR as a failure and nothing rebuilt the chain, so a window resize or minimise between creation and the next Present left Present returning E_FAIL for good, with the presentation engine still holding the image. Host DXGI returns S_OK through all of these (measured: plain resize, minimise, restore, ResizeBuffers while minimised). - present() tracks stale_/presentable_: an image is presented once, and an out-of-date present or acquire marks the chain stale instead of corrupting it. - recreate_native() rebuilds only the native VkSwapchainKHR at the surface's current extent, under the app's back buffers (safe with the offscreen ring), and re-acquires. Present retries once, then returns S_OK when the frame is skipped, never E_FAIL for a surface condition. - A 0x0 surface extent refuses creation instead of emitting a 0x0 VkSwapchainKHR (VUID-VkSwapchainCreateInfoKHR-imageExtent-01274) and zero-extent blits; ResizeBuffers on a minimised window completes like the host. - The acquire wait is bounded (1 s) and the latency semaphore is released on a skipped frame, so a minimised surface cannot hang a wait-then-present loop. With direct native images (BufferCount equal to the driver's native count) the app's back buffers cannot be replaced under it: the frame is skipped and the app's ResizeBuffers restores pixels. present_risk_test covers all of it. Tested on an RTX 5070 Ti (32.0.16.2124), Vulkan 1.4.363.0, MSVC 19.44, RelWithDebInfo: dxgi_swapchain, dxgi_swapchain_count, xbox_present, d3d12_present, vk_presenter_sync and present_risk pass (61 checks, 0 failed) under LEONIDA_VK_VALIDATION=1 with 0 validation errors. (cherry picked from commit 81903dc)
(cherry picked from commit 0b094ae)
(cherry picked from commit 879fd35)
wait_locked retired frames by the wake time, so a finite wait that overslept its deadline could be let through by a frame that only showed after the deadline. Retire up to the deadline instead: the slot has to be free by then, and a later call retires the rest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 6a26704)
Retiring only up to the deadline did not hold when another call (such as GetFrameStatisticsX) retired the frame between the waiter's wake and its reacquiring the mutex: the slot was already free, although it freed after the deadline. Keep when the last `latency` frames were shown, and count the frames shown after min(now, deadline) as still in flight for the wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 06f9005)
(cherry picked from commit 85ee375)
(cherry picked from commit 0b8b354)
…ad recording, 5120-SRV table, pipeline cache) Test d3d12_m5_world_test (D3D12 API only, translator-output shaders, every pixel against a CPU reference): (a) five ExecuteIndirect calls (DRAW and DRAW_INDEXED signatures, CPU- and GPU-written records at offsets in placed buffers, count buffer, count 0, count above MaxCommandCount), (b) four threads recording four lists run in one ExecuteCommandLists, eight rounds, (c) a descriptor table of 5120 SRVs of distinct textures read at a byte offset from a root constant, (d) a PSO created twice through the device's VkPipelineCache. Layer gaps fixed on the way: - ExecuteIndirect draws carry the list's graphics state and replay as whole draws; they used to replay as a bare vkCmdDraw*Indirect outside any render pass with no pipeline bound. - multiDrawIndirect, drawIndirectCount and drawIndirectFirstInstance are enabled on the layer's device where present (VulkanDeviceInfo::multi_draw_indirect / draw_indirect_count); without multiDrawIndirect each record is its own call. - One VkPipelineCache per device for every graphics and compute pipeline (was VK_NULL_HANDLE), with VkPipelineCreationFeedback hit counting (rt::d3d12::pipeline_cache_stats). Section 6 M5 row: synthetic part met except mesh shaders (D3D-29). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 87b1421)
…ature flags, test leniency - A draw-kind ExecuteIndirect with no graphics state is unsupported at prepare unless it is marked raw (ExecuteIndirect::raw, set by the unit tests that wrap the call in rendering themselves). - Calls take at most VkPhysicalDeviceLimits::maxDrawIndirectCount records (ReplayFunctions, VulkanDeviceInfo). - VulkanDeviceInfo::draw_indirect_first_instance is recorded; the layer logs once when it is absent. - VulkanDeviceInfo::draw_indirect_count defaults to false. - d3d12_m5_world_test: without drawIndirectCount the count-buffer calls are left out; pipeline-cache checks only run when the driver returns valid creation feedback, and size equality only when both sizes are known. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d86d2fe)
The fixed-count loops added a full chunk to a 32-bit cursor, so a short final chunk could wrap it and restart at argument offset 0 (MaxCommandCount UINT32_MAX with maxDrawIndirectCount 0x80000000). Found by @Vonsek in review of and for a limit that does not divide the count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d60c7a3)
…wing without bound A cursor that wraps again now ends the loop with a failed check rather than appending until memory runs out. Checked by lowering the cap to 1: the check fails at the call. Suggested by @Vonsek in ItsNotRexed#1865. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit fa8af16)
…main's translator subtracts BaseVertex/BaseInstance) After the round-41 merge the non-indexed records (P1) all drew cell 0: they chose their cell by StartVertexLocation, which the hardware-style zero-based v0 no longer carries. P1 now picks cells through the instance id (InstanceCount), indexed records still through the index values. The layer and the merge were fine; the test relied on an id semantic main changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c40a6cf)
…sh gate with a translated mesh shader CreateCommandSignature takes DISPATCH_MESH where VK_EXT_mesh_shader is enabled (E_NOTIMPL without it). ExecuteIndirect records it with the state DispatchMesh takes, and replay issues vkCmdDrawMeshTasksIndirectEXT, or vkCmdDrawMeshTasksIndirectCountEXT with a count buffer, split by multiDrawIndirect and maxDrawIndirectCount as the draw kinds are. build.py makes the PSV0 container of a mesh shader whose header has a psv0: line, so translated mesh shaders can be layer-test fixtures. d3d12_m5_mesh_test draws ms_m5.asm (NGG wave64, 128 threads, the corpus's v5/s3 idioms) by DispatchMesh and by ExecuteIndirect, error 0. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 824de35)
…mesh container test AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 359985c)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 494f117)
… fallback-path ctest; run_gpu_tests reads the psv0 header - Pass the device's subgroup caps to the layer, so the wave64 mesh stage asks for 64; exit 77 where the device cannot run it 64-wide, or has fewer than 144 push-constant bytes. - --single-calls / --no-count-buffers turn multiDrawIndirect / drawIndirectCount off on the layer's device; registered as d3d12_m5_mesh_fallbacks. Without drawIndirectCount a count-buffer call must be ReplayResult::unsupported. - scripts/run_gpu_tests.py translates every .asm itself: give a mesh shader with a psv0: header its PSV0 there too (ms_m5 failed translation in the GPU suite without it). AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit e2bf13c)
…p size Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit ded6db7)
From two review passes (one adversarial): - CreateCommandSignature refuses DISPATCH_MESH after root arguments (E_NOTIMPL, as before this branch) instead of accepting it and reading the group counts from the record's first bytes. - CommandList::execute_indirect refuses a mesh dispatch without DispatchMesh's state, and a draw kind with it. - The test fails on validation errors, as its siblings do; asserts the mesh stage's subgroup request was found (and fails on an undecided one). - I5 runs at stride 24 without a count buffer, zero-padded, 1 to 4 groups per record; new d3d12_m5_mesh_chunks lowers the layer's maxDrawIndirectCount to 3 so the calls are split. Mutations caught: chunks that don't advance (chunks run), a stride hard-coded to 12 (both). - Docs and comments: one-argument signatures only; maxDrawIndirectCount applies without a count buffer; invalid_draw for a draw signature with a mesh PSO needs a topology; only a record's group total is visible; ms_m5 sends GS_ALLOC_REQ from every thread; whitespace restored. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 90d90bd)
…ot every GPU Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 071565a)
…ce caps; build.py psv0 error From review on ItsNotRexed#3777: - The wave64 skip is decided from the library entry and the device's subgroup caps (decide_subgroup_size, as the layer decides it) before any mesh PSO is created, so a device that cannot run ms_m5 skips even if its PSO creation would fail. The PSO's own mesh-stage request must match that prediction. (whattheflop) - The DispatchMesh part clears to 128/255 instead of 0.5: 0.5 is 127.5 in UNORM8 and some GPUs store 127. The emulated RTX 5070 / 5080 runs differed only there. (kacper-serewis, tedin7) - The layer's device info gets drawIndirectFirstInstance, as d3d12_m5_world_test does, which silences its "not enabled" log. (ddm-j) - build.py: an ms_ shader without a psv0 header raises a clear ValueError instead of a TypeError when translate_tests is called directly. (tupacfan04) AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit a4e5561)
A request with ZlibDecompress alone now reads SourceSize bytes of the file or of memory into a staging buffer, inflates them with the runtime's RFC 1950 inflater (leonida::zlib_inflate in src/shader_library.h) and copies the result to Destination only when it is exactly DestinationSize bytes. A failed stream leaves the destination untouched, and a memory source inside its own destination inflates correctly. Checks follow DSTORAGE_REQUEST and dstorageerr.h: DestinationSize must be larger than SourceSize with zlib (E_DSTORAGE_INVALID_DESTINATION_SIZE), a zlib FileOffset must be 16-byte aligned (E_DSTORAGE_INVALID_FILE_OFFSET), IntermediateSize stays 0 without BCPack. Stream failures map to E_DSTORAGE_ZLIB_BAD_HEADER, _ZLIB_BAD_DATA, _ZLIB_PARITY_FAIL (Adler-32) and E_DSTORAGE_DECOMPRESSION_ERROR (a result of another size). GetStats counts the inflates, the pending ones and the decompression errors. zlib_inflate gains an optional failure reason (header, data, checksum, limit); its existing callers are unchanged. BCPack, swizzle and physical-page requests still fail with E_NOTIMPL. dstorage_test: synthetic streams only (Python zlib levels 9 and 1, stored blocks built by the test), from a file and from memory, with every failure code; shader_library_test checks the new failure reasons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 00551ba)
…nflict markers)
…ions An earlier conflict resolution cut proxy_get_resource_allocation_info after the descriptor copy, so it returned without writing the PC answer. The slot-70 handler is now built in, so an invalid environment override must still answer with the handler (the mock's PC slot 70 is not reached).
…precedence test now proves the override ran (ItsNotRexed#7231)
Slot 79/80: a refused early ScheduleFrameEventX/WaitFrameEventX no longer hands the title a negative HRESULT; the stand-in origin/token keeps the boot moving until the first PresentX. Also keep the single proxy_create_placed_resource_x definition (the branch had a duplicate), with the barrier-layout -> COMMON rule in that one copy.
…ateSampler The retail title calls device slot 61 as CreateSamplerX(desc, dest handle), once per sampler, after its descriptor heaps exist (stop 20 of the RT-5 boot measurements in the coordination issue). The generic thunk forwarded it to the PC slot 61, which is CreateMetaCommand, so the sampler was never written. Slot 61 now has its own handler, like 62 and 67. It passes the description's PC D3D12_SAMPLER_DESC prefix and the handle to the PC CreateSampler (slot 22). That was enough to get the title past this call under Wine. Whatever follows the prefix in the console description is not known and is not read. A null description is skipped and logged once. A handle in the title's own heap range is ItsNotRexed#7021's translation. xs_proxy_mock_test: slot 61 reaches the mock's slot 22 with the same two words and never its slot 61; a null description reaches nothing. With main's d3d12_xs_device.cpp the new check fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit b3204f70790fe7d1dc5a5ee8a595f10c0d09de5d)
3f794dd (the pinned base) leaves a stray brace that closes the namespace before the rest of d3d12_xs_device.cpp, so it does not build. Take the three follow-up commits from exe-day-merge-16937 verbatim: fed318354 close the slot-61 handler without closing the namespace ea16e16ce keep slot 86/101/108 overridden in the slot-61 merge fefca99e4 slot 41 stays in the overridden set after the slot-61 union No feature behavior is added here; the stack below starts from the tree the presenter branch builds.
…ItsNotRexed#7290) Port refs/pr/7290 (04fdf37, "Refresh the Xbox fence value after a rewind") onto the merge branch, whose fence proxies had no slot 12 at all. The retail executable calls fence slot 12, one past ID3D12Fence1, as (value, descriptor, flags) and reads the return as a pointer to the fence's 64-bit completed value; refused with E_NOTIMPL it dereferenced 0x80004001. Each fence now gets a live mirror: a thread-pool wait refreshes it on a completion event or a 10 ms timeout (the timeout also observes a rewind, without adding a second completion event), slot 12 and the CPU Signal (10) refresh synchronously, device removal holds ~0, and release unregisters the wait before the real fence. The descriptor's code pointer is not called. The only hook the merge branch had was the generic refused tail, so this port brings the mirror itself (from 5ac4dea) as well as the rewind refresh. Fence slot 12 is the one served slot past the public chain; 11 (when the fence is not a Fence1) and 13 and past stay refused. Tests: xs_proxy_mock checks address stability, CPU Signal, an outside progress, a rewind below the armed event without a second registration, the pending event surviving the fallback, device removal and release; check_tail now starts its refusal loop at 13. The mock fence gained a mutable completed value, SetEventOnCompletion and Signal.
5c539c2 made slot 133 create a console barrier layout (any word up to 0xFF, RENDER_TARGET included) as COMMON, but the mock test kept expecting RENDER_TARGET, so xs_proxy_mock stopped at the first slot-133 case. Expect COMMON, which is what the fixup says the console word means, and keep a case for a legacy state above 0xFF (COPY_DEST) so the branch that preserves one stays covered. Test-only; no runtime behavior changes.
…oken source (ItsNotRexed#7685) Port refs/pr/7685 (afb14d5) onto the merge branch. Device slot 80 (WaitFrameEventX) numbered its tokens with a counter of its own, while XboxPresentation's pacer refused any token above the ones it issued itself. A title that waited through the device and presented through the device's XboxPresentation therefore had every PresentX refused with E_INVALIDARG once its tokens ran ahead of the pacer's. leonida::FrameTokenSource is now the counter both use: a pacer takes an optional shared source (a standalone pacer still owns its own and numbers as before), the device proxy owns one and exposes it through rt::d3d12_xs::device_frame_tokens, and XboxPresentation passes a given source to its pacer. A token that was never issued is still refused. The merge branch also hands out a boot token when the pacer refuses or times out a wait (the title int3s on a negative WaitFrameEventX); that fallback now takes the next token from the same shared source instead of frame_next_token. The sink factory gains the Xbox-ABI device so the retail factory can fetch the source; presentx_window_test's synthetic factory follows the new signature. Tests: frame_pacer (an outside token is accepted, outside + 1 is not, the next wait continues the sequence), device_proxy (slot 80 draws from the device source), xbox_present (a device slot 80 token presents; never-issued token + 1 is refused).
…llocator, pso) Port the list-139 part of 5cf47bab3 on gta6vi-frame-submit (a commit that mixes the frame loop, the fence mirror, the token source, list 139 and allocator 9; the other parts are separate commits here). The retail title resets its console command list through slot 139, measured between Close and recording, not through the PC slots. Forward it to PC Reset (slot 10) with the allocator and pipeline state proxies unwrapped, so the real list gets the real objects. Slots 131 and 132 keep their no-op S_OK, and 140 and the rest of the 160-slot table stay refused. Every existing handler is unchanged. Tests: xs_proxy_mock creates the console list through slot 73, calls the accepted Close slot, then 139, and checks that PC slot 10 received the unwrapped allocator and the unchanged pipeline state.
… poison word repaired Port the allocator-9 part of 5cf47bab3 on gta6vi-frame-submit. The retail title's allocator-pool path calls one slot past the public chain. Its shape is not measured, so the proxy logs the first calls and answers S_OK without forwarding, touching no caller pointer except the one observed poison: when the first word names writable committed memory that holds all ones (the value the title then reads through), it is set to null, the COM convention for "no object". Slots 10 and past stay refused, and Reset (8) still forwards. Every existing handler is unchanged. Tests: xs_proxy_mock drives an allocator proxy's slot 9 with the poison word, a normal word and null, and checks that nothing reached the real allocator; the refusal loop now starts at 10.
…k HRESULT From 2a08e6e76: XGCreateTextureComputer returns E_NOTIMPL but stores a static 32-slot computer, whose measured slots 1/2/8/10 do nothing and write nothing. XGSuggestSwizzleMode returns E_NOTIMPL and leaves the caller's mode field alone. Adds the xg_xs test target.
…allocation formats
…e TLS context at 4 GiB
Contributor
Milestone Architecture & Clean-Room VerificationTested and audited the integrated stack on Windows 11 host:
Historic milestone for the project! |
This was referenced Nov 23, 2026
This was referenced Nov 23, 2026
Nikide
added a commit
to Nikide/Leonida
that referenced
this pull request
Nov 23, 2026
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.
d3d12_xs: the retail 1.0.2.1 window stays open and accepts input
Milestone: the retail executable now creates its own window, keeps it open, and
processes mouse/keyboard messages. This is the first live window from the
presenter path; a rendered frame is not claimed yet (no present readback).
Evidence (one run, this branch)
AmericassgaWindowClass0x4F00D0338,0 3840x1460IsWindowtrue, process alive afterWM_MOUSEMOVEWM_KEYDOWN/WM_KEYUPVK_Wpresent-*.ppm)Binary:
gta6rt.exe, SHA-256F83073A31742F0C5C7705CACC5F1BD05DDBCE8D911882548B828345C2D579421.Last-mile changes on top of the open stack
TEB->ThreadLocalStoragePointer[0]; its per-thread render context pointerlands at the 4 GiB boundary. The runtime now keeps the title's slot-0 TLS
block and writes the thread's context pointer at
0x100000000on firstaccess (the console layout), instead of faulting on the boundary page.
A8_UNORMrender targets. Native D3D12 refuses an A8 render target; thetitle renders its 4K alpha/UI target as A8. The Xbox path now accepts
ALLOW_RENDER_TARGETfor A8 (stored asR8_UNORM, the A8 view swizzles alphafrom R).
UINT64_MAX(A8, B5G5R5A1), slots 25/108 answer a console-shaped size(aligned, below 4 GiB) so the title's 32-bit size assert holds.
12, and one shared
FrameTokenSourcefor device 80 and PresentX (PresentX: device-side WaitFrameEventX and the frame pacer share one token source #7685),which stops every present being refused as "never handed out".
requests are now in the local corpus (26,607 entries, 0 slot-67 failures).
The corpus is not in this branch; only counts and the loader path are public.
XGCreateTextureComputerstores a stub for thecallers that ignore the HRESULT.
Known limits (not hidden)
ShowWindowso the live window can be measured. No frame has been read back, so a visible image is not claimed; the windowcontent at this point is whatever the Vulkan swapchain last presented.
no wave64 graphics emulation yet).
S_OKwithout an implementation; it ismeasured as a null vtable entry reached by the frame path.
3f794ddbaplus the open PRs below, not arebase onto today's
main; treat it as a milestone branch, not amerge-ready single change.
Stack (all open upstream at cut time)
#7021 #7066 #7052 #7110 #7078 #7240 #7163 #7115 #7180 #7529 #7290 #7685
#7323 #7201 #7516 (BVH unwrap) plus local fixups: slot-133 COMMON layout,
list 139/allocator 9 pool path, fence 12, shared frame tokens, A8, TLS-0
context, allocation fallbacks.
Tests
merge/frame-submit-stack:ctest -R "xs_proxy_mock|device_proxy|command_list|d3d12_present|presentx_capture|frame_pacer|xbox_present"— 19/19 passed (before the last three local fixups).AI-assisted; slot numbers, RVAs, API names and counts only.