Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
fa4feed
Integrate current main and nvidia-dev for local world testing
raylitebull Nov 27, 2026
3219532
Merge remote-tracking branch 'origin/main' into HEAD
raylitebull Nov 27, 2026
1dc3cf5
Recompiler: prefer live lanes in Direct DXIL PS v_readfirstlane and w…
raylitebull Nov 25, 2026
e5aa419
Direct DXIL: fold Countbits of constants (AMD folds Bfrev(Countbits(K…
Diskuss Nov 25, 2026
43d83cf
Recompiler: Wave32 pixel mask writes kill one SGPR, not a pair
itsSio Nov 26, 2026
b958a34
Recompiler: the compact form's larger tables on every GPU again
Royalflamejlh Nov 25, 2026
fcbd0d1
Recompiler: guard 32-bit raw-buffer OOB wraparound in Direct DXIL
raylitebull Nov 25, 2026
aac4343
Recompiler: fix Direct DXIL live double-ext scan and movrel VGPR range
raylitebull Nov 25, 2026
3c54e55
Recompiler: fold constant CFG terminators and recompute live DXIL flags
raylitebull Nov 25, 2026
f089a9d
DXIL: shrink emitted shaders 4.5x-5.4x via abbrevs, compact micro-blo…
raylitebull Nov 25, 2026
33d1222
DXIL: fix compact SGPR liveness for RMW/CMOV SALU and Wave32 masks
real-alponzo Nov 26, 2026
9887b41
DXIL: trigger compact form on branch-heavy shaders to prevent driver …
Saksukella Nov 26, 2026
6fa964d
WIP: nvdev-shrink working tree as of nvs-run39 (2026-11-27)
raylitebull Nov 27, 2026
a68f609
D3D12.X: light the retail world – barrier groups, depth twins, ambient
raylitebull Nov 28, 2026
f9fd4bf
Recompiler: add BVH box-grow ULP, ray NaN/Inf inactivation, and trian…
raylitebull Nov 28, 2026
081da4b
DirectStorage: implement CPU unshuffle/interleave for BCn swizzle modes
raylitebull Nov 28, 2026
108cbaf
kernelx: decode XMemVirtualAlloc XMemFlags and refine graphics protec…
raylitebull Nov 28, 2026
fdd1ac2
D3D12.X: track depth/stencil planes in barrier groups and keep legacy…
raylitebull Nov 28, 2026
48cf713
D3D12.X: honor single-plane PresentX source rects, lock-free shader c…
raylitebull Nov 28, 2026
a46703b
D3D12.X: avoid depth_uav stencil subresource underflow and align bvh_…
raylitebull Nov 28, 2026
60345c9
D3D12.X: deduplicate retained base PSO shader bytecodes with a shared…
raylitebull Nov 28, 2026
f2962ee
D3D12.X: segments parked as spares stop holding their PC allocator
Kalmarv Nov 27, 2026
e91a788
D3D12.X: XCL_SMALL_TEXTURES=1 puts small sampled textures on 4 KiB pl…
Kalmarv Nov 27, 2026
87e900b
Memory: defer private physical-home GPU tiles on NVIDIA
Prime1997 Nov 28, 2026
01a99a4
Memory: use a 2 MiB grain for allocator page size two
Prime1997 Nov 28, 2026
4fb9d49
Recompiler: the pixel prelude's quad ballot has no loop for DXC to un…
Royalflamejlh Nov 26, 2026
c5ff1d0
D3D12.X: pack sparse pool tile reuse into the fullest heap
itsSio Nov 26, 2026
8942a5b
D3D12.X: indirect light made in space, bake sources by index, shadowe…
raylitebull Nov 28, 2026
27e9562
D3D12.X: process 2D texture tiling in contiguous block runs
Nov 26, 2026
51182d0
D3D12.X: cache positive mirror range lookups
Nov 26, 2026
5338c0f
D3D12.X: reduce unrelated write-watch scanning
raylitebull Nov 28, 2026
0edced4
D3D12.X: split sparse readback spin and submission out of STATE lock
raylitebull Nov 28, 2026
f2f02bd
D3D12.X: omit sparse tiles with no committed page from write-watch ra…
raylitebull Nov 28, 2026
fe5260b
D3D12.X: leave GPU-written textures out of the write-watch ranges
raylitebull Nov 28, 2026
1be2221
D3D12.X: texture uploads keep their lists when their buffers go
raylitebull Nov 28, 2026
512b0bb
D3D12.X: retain a texture upload job whose fallback wait fails
raylitebull Nov 28, 2026
15a72ce
D3D12.X: XCL_UMA_DRIVER=mixed keeps part of the coherent window in VRAM
raylitebull Nov 28, 2026
e8767e8
D3D12.X: XCL_UMA_DRIVER=mixed applies to the first coherent window only
raylitebull Nov 28, 2026
61559df
D3D12.X: XCL_UMA_DRIVER=mixed makes a refused GPU_UPLOAD segment CUSTOM
raylitebull Nov 28, 2026
aaf42bd
D3D12.X: a console buffer across two segments of a mixed window takes…
raylitebull Nov 28, 2026
feeb016
D3D12.X: XCL_UMA_UPLOAD_PRIORITY=1 keeps a mixed window's GPU_UPLOAD …
raylitebull Nov 28, 2026
91122ee
Recompiler: the DXIL cache key leaves out comments and indentation
KOLESNiii Nov 28, 2026
3bb095a
D3D12.X: write-watch ranges merge across gaps of up to 4 MiB, not 8
KOLESNiii Nov 28, 2026
a16c503
DXIL: fix heap_structured_buffer, texture_load, and wave_all_equal fe…
Decodere Nov 25, 2026
66c7210
Recompiler: route every shader stage through direct DXIL by default
Foniass Nov 28, 2026
34634c8
Recompiler: adapt PR #3241 long-source test to local dxc.rs threshold
raylitebull Nov 29, 2026
965cc65
Recompiler: implement early-exit-safe multi-wave s_barrier in Direct …
raylitebull Nov 29, 2026
da910cc
D3D12.X: wire memory-mapped ID3D12PipelineLibrary1, AMD cache default…
raylitebull Nov 29, 2026
82d5eea
Shaders: count per-variant pipeline builds in preparation progress UI
raylitebull Nov 29, 2026
f33df5a
D3D12.X: disable ID3D12PipelineLibrary1 by default on AMD (0x1002)
raylitebull Nov 29, 2026
23d0f36
D3D12.X: XMemVirtualAlloc GPU heaps go to the coherent window again
iggyvilla Nov 29, 2026
10582c4
Merge pull request #3369 from iggyvilla/amd-xmem-gpu-heaps-coherent
raylitebull Nov 29, 2026
18a3882
D3D12.X: strip Xbox root signature flags for PC and honor FORCE_MEMOR…
Prime1997 Nov 29, 2026
24bc619
D3D12.X: cache invariant slots in hot hooks
raylitebull Nov 29, 2026
12f791f
D3D12.X: drop CreatePlacedResourceX alias table once logged and avoid…
Decodere Nov 26, 2026
91581c8
D3D12.X: forget a command list before the runtime frees it
Nov 26, 2026
633f59c
DirectStorage: precompute BCPack bit packing
Nov 26, 2026
785fcb5
D3D12.X: XG CopyInto/FromSubresource take the newer library's added a…
lukastaro Nov 24, 2026
3ebfffc
Recompiler: the HLSL NaN guard keeps finite PS exports, as the direct…
raylitebull Nov 29, 2026
8c79f57
Recompiler: direct DXIL wave32 PS / VS reductions count every live lane
raylitebull Nov 29, 2026
45ed56c
Recompiler: quad-local lane reads of pixel shaders take quad reads alone
raylitebull Nov 29, 2026
070e2da
Recompiler: PS sample index and fixed-point position VGPRs get values
emirduran707 Nov 24, 2026
4877f81
D3D12.X: ambient finds the reflection resolves' image in its slot
raylitebull Nov 29, 2026
2238e44
D3D12.X: ambient holds resolved reflections to the light around
raylitebull Nov 29, 2026
89680f2
D3D12.X: ambient bounds the light of transparent surfaces and particles
raylitebull Nov 29, 2026
2ba3081
D3D12.X: ambient drops the probes' blue garbage from the diffuse resolve
raylitebull Nov 29, 2026
0e68d60
D3D12.X: draws that test a depth buffer left in UAV get its twin first
raylitebull Nov 29, 2026
b0573e3
D3D12.X: a mirror's view is given the light around while rays are off
raylitebull Nov 29, 2026
c06cf41
D3D12.X: a GPU-written texture stays the GPU's over later page mappings
raylitebull Nov 29, 2026
02ceae6
D3D12.X: compare the pages a mapping changed under a texture before u…
raylitebull Nov 29, 2026
0b985d7
D3D12.X: a texture made over a GPU-written one keeps the GPU's texels
raylitebull Nov 29, 2026
f78e508
D3D12.X: recycle released reserved sampled textures by description an…
raylitebull Nov 29, 2026
27f5f62
D3D12.X: split the ExecuteCommandLists hook into steps a thread can run
raylitebull Nov 29, 2026
db556c2
D3D12.X: tell the title's queue calls from XCL's own by their caller
raylitebull Nov 29, 2026
b54c6d9
D3D12.X: XCL_ASYNC_SUBMIT=1 makes the title's submits on a thread of …
raylitebull Nov 29, 2026
9f9a9bc
D3D12.X: the submit thread refreshes once for a batch of submits
raylitebull Nov 29, 2026
077047a
D3D12.X: count what the submit thread does in the 1024-submit lines
raylitebull Nov 29, 2026
09536b8
D3D12.X: a CPU read waits for its copy back with the sparse lock rele…
raylitebull Nov 29, 2026
707123a
D3D12.X: mapped ranges asked again at the same generation need no lock
raylitebull Nov 29, 2026
2a630fd
D3D12.X: XCL_LOOK_STATS=2 splits a look's other time and the GPU-view…
raylitebull Nov 29, 2026
5ff2b66
D3D12.X: a look finds the blocks new to the watched ranges by their c…
raylitebull Nov 29, 2026
eabf2de
Tests: a CPU read longer than the readback buffer, and its partial ch…
raylitebull Nov 29, 2026
451aad4
Docs: list the VIctory-Neo ambient ports in THIRD_PARTY.md
raylitebull Nov 29, 2026
f5ccab5
Tests: give the last-release test's fake resource a GetDesc
iggyvilla Nov 29, 2026
1e75126
Tests: sparse tests take CI's Basic Render Driver for a software device
DzXAnt22 Nov 26, 2026
f1a10f1
Tests: a console MS in the AS slot is refused by its MS translation
MarcosMDev Nov 26, 2026
e46947d
D3D12.X: drop CopyScratch resources outside COPY_SCRATCH lock and ski…
iggyvilla Nov 29, 2026
28510c2
Recompiler: serialize dxc::wait_for_memory slot admission
Nov 26, 2026
725fd9e
DXC: keep LINK_GATE open on OOM and forward opt/extra args to IDxcLin…
Nov 26, 2026
5e48878
Recompiler: direct compute LDS is the block the program declares
raylitebull Nov 29, 2026
9362923
Recompiler: one-wave 2-D compute groups number their threads by lane
raylitebull Nov 29, 2026
2d53b4c
Recompiler: XCL_COHERENT_PER_ACCESS=1 keeps plain heap-window loads c…
raylitebull Nov 29, 2026
bb570dd
Recompiler: fold unobserved EXEC selects in direct DXIL
raylitebull Nov 29, 2026
41dc012
Recompiler: XCL_DIRECT_COMPACT_MIN=<n> takes big compute programs com…
raylitebull Nov 29, 2026
712f1fe
Recompiler: D16 format loads round UNORM / SNORM once, truncate floats
upipibi Nov 29, 2026
50acd77
Recompiler: a 2-bit SNORM store component rounds a half away from zero
upipibi Nov 29, 2026
31f45f3
Direct DXIL: v_cvt_f16_u16 / v_cvt_f16_i16 decode inline float consta…
emirduran707 Nov 29, 2026
55e296b
Direct DXIL: saturate v_pk_*_i16 CLAMP with masked select
Decodere Nov 29, 2026
b2f5729
Direct DXIL: rm_sqrt keeps negative preserved denormals NaN, rm_mad g…
Decodere Nov 29, 2026
b500251
Recompiler: v_ldexp_f16 keeps ±0 and ±inf for any exponent
joeypercia Nov 29, 2026
ce72ad9
Direct DXIL: lower i64 min/max as compare/select
luckyteagirl Nov 29, 2026
3e6c71a
Direct DXIL: reject invalid stage exports and graphics LDS ops
Decodere Nov 29, 2026
cc0f2a7
Direct DXIL: reload invalidation tracks VOPC SDWA SDST and cache barr…
Decodere Nov 29, 2026
94dbef8
Recompiler: use u128 dependency masks for reload invalidation
amazedturnip Nov 29, 2026
73c0574
Direct DXIL: include write address and control in signature dependencies
luckyteagirl Nov 29, 2026
6c27cf1
Direct DXIL: sign-extend D16 image_store halves for SINT textures
emirduran707 Nov 29, 2026
942072b
Direct DXIL: pixel-shader lane-mask SCC tests count live lanes only
Decodere Nov 29, 2026
6f954bc
D3D12.X: remap superseded targets bound through descriptor tables
NathanOPUS Nov 29, 2026
a94353a
D3D12.X: the same root signature set again keeps the root arguments
tiagonleal Nov 29, 2026
cd4db09
D3D12.X: check lazy array and 3-D texture levels without detiling
NathanOPUS Nov 29, 2026
19996da
D3D12.X: let independent submits bypass a busy copy pool
gefydev Nov 29, 2026
d5d437a
Shaders: reset branch targets per FSSM program and do not merge acros…
b3IKK Nov 29, 2026
edd291d
D3D12.X: keep logic ops on pipelines whose render targets are all UINT
tiagonleal Nov 29, 2026
2789e60
D3D12.X: copy texture regions with unaligned footprints through scratch
tiagonleal Nov 29, 2026
7cb4b38
D3D12.X: stencil, topology and scissor sets go into deferred two-pass…
Kalmarv Nov 27, 2026
c7388f3
D3D12.X: deferred two-pass runs of all lists share one record buffer
raylitebull Nov 29, 2026
34e95e7
D3D12.X: deferred two-pass ExecuteIndirects take smaller record regions
raylitebull Nov 29, 2026
0bad17b
Tests: deferred two-pass runs read their own records on the GPU
raylitebull Nov 29, 2026
5ab4f64
Shaders: --measure-pso --direct and --measure-dxil time the run's DXI…
raylitebull Nov 29, 2026
e35c384
Recompiler: XCL_DIRECT_FORMS_ONLY=<records> keeps the newer forms to …
raylitebull Nov 29, 2026
5c5ee83
Recompiler: key XCL_DXIL_NO_OPT into the translated caches
raylitebull Nov 29, 2026
4dea333
D3D12.X: builds a title thread waits for go to urgent pipeline workers
raylitebull Nov 29, 2026
927524e
D3D12.X: XCL_PSO_RAM_FLOOR_MB lets driver compiles start as RAM allows
raylitebull Nov 29, 2026
19f303d
Shaders: --measure-* also report the commit a compile leaves behind
raylitebull Nov 29, 2026
36e16cf
Recompiler: default to the retail run's tested forms and compile limits
raylitebull Nov 29, 2026
4fedcbc
Merge main (24d21a41) into amd-dev
lucsoft Nov 29, 2026
5eb7f8f
Merge amd-dev (36e16cf4) into merge/main-into-amd-dev
lucsoft Nov 29, 2026
069c29f
D3D12.X: a held resource's batch is sealed without waiting for a busy…
lucsoft Nov 29, 2026
9990331
D3D12.X: XCL_TRACE_INDEXED logs the state of textures draws pick by i…
raylitebull Nov 29, 2026
8dfc469
D3D12.X: a bake's indices name textures through the view heap's slots
raylitebull Nov 29, 2026
3de7ab1
Shaders: --measure-pso --direct times every piece of a split program
raylitebull Nov 29, 2026
3fc4273
D3D12.X: XCL_RT_LEAVE_OUT_COUNT=1 counts the work of left-out programs
raylitebull Nov 29, 2026
67af2f0
D3D12.X: reflections that found nothing take the light around them
raylitebull Nov 29, 2026
f0255ae
XGameRuntime: skipped Bink movies show black instead of their memory
raylitebull Nov 29, 2026
f93e55f
D3D12.X: binds do not wait for the BVH builder's pipelines while it i…
raylitebull Nov 29, 2026
510e466
Tests: probe the console FSR4 upscaler's history over frames on the GPU
raylitebull Nov 29, 2026
9f6e7d5
FidelityFX: XCL_FFX_TRACE logs the title's upscales, XCL_FFX_RESET dr…
raylitebull Nov 29, 2026
59e9e6e
D3D12.X: console lists log their record order and honour XCL_SKIP_CS
raylitebull Nov 29, 2026
6bab0c5
Recompiler: 8- and 4-bit dot products take OP_SEL halves of their sou…
raylitebull Nov 29, 2026
3277aca
Merge amd-dev (6bab0c53) into the main merge
lucsoft Nov 29, 2026
23ee6c2
D3D12.X: keep amd-dev's tested huge-pipeline defaults after the main …
raylitebull Nov 29, 2026
708fdcc
Merge main (1bd9cee1) into the main merge
raylitebull Nov 29, 2026
978b813
D3D12.X: a PC Reset clears the recording's poison without predication…
raylitebull Nov 29, 2026
ae15ff7
Tests: read the symbol table of abbreviated DXIL bitcode
raylitebull Nov 29, 2026
125e953
Shaders: give workers_for_commit the RAM available as an argument
raylitebull Nov 29, 2026
4b927e1
Tests: keep amd-dev's form of the PS mask SCC live-lane ballot test
raylitebull Nov 29, 2026
5b238c8
Tests: let the PS NaN guard wrap RT0 in the 32-bit target pkrtz test
raylitebull Nov 29, 2026
9a3d4e0
Recompiler: key XCL_DXIL_NO_OPT into the translated caches again
raylitebull Nov 29, 2026
8ebae57
Recompiler: a reduction's row mirror may set BOUND_CTRL
raylitebull Nov 29, 2026
8f01e42
Tests: the pipeline library's own tests turn it on on AMD too
raylitebull Nov 29, 2026
eec5cbc
Shaders: key amd-dev's translation switches into the warm settings
raylitebull Nov 29, 2026
b9ffe63
D3D12.X: a released reserved texture is parked for reuse again
raylitebull Nov 29, 2026
0481ad6
Shaders: prepare split programs without whole forms the title cannot …
raylitebull Nov 29, 2026
c427af0
Shaders: compute preparation workers get the window count without HEA…
raylitebull Nov 29, 2026
5ef4a38
D3D12.X: title submits wait for tile mappings on the CPU again
raylitebull Nov 29, 2026
e03446c
D3D12.X: recycled texture pages are zeroed before a new texture uses …
raylitebull Nov 29, 2026
aeefef1
D3D12.X: small sampled textures go to 4 KiB blocks of shared heaps again
raylitebull Nov 29, 2026
8ea8524
Memory: level pages, small textures and 64 MB of upload buffers by de…
raylitebull Nov 29, 2026
737588b
Recompiler: heap windows read without a branch in every stage again
raylitebull Nov 30, 2026
859e8ad
ambient: find the stand-in's passes and build its helpers under Wine
lucsoft Nov 30, 2026
2f3d113
d3d12x: zero recycled page-pool tiles before a new texture uses them
lucsoft Nov 30, 2026
e3fae4e
d3d12x: keep dispatch chain scratch until the GPU is done with it
lucsoft Nov 30, 2026
a1a84aa
Merge pull request #3444 from lucsoft/merge/main-into-amd-dev
raylitebull Nov 30, 2026
4da33e2
Benches: initialize PsInterface::early_depth in gpu_cpu bench
raylitebull Nov 30, 2026
f9e3172
D3D12.X, loader, kernelx: bake-at-submit, ambient refinements, upscal…
raylitebull Nov 30, 2026
afeb3e5
Merge main into amd-dev-into-main
lucsoft Nov 30, 2026
3a3a8e9
Sparse, shader, kernelx: cache committed source regions across Virtua…
raylitebull Nov 30, 2026
4d6d4a7
D3D12.X: remove per-draw/barrier mutex contention, cache barrier desc…
raylitebull Nov 30, 2026
41aa60c
Title patch: add XCL_UPSCALER_HEAP_MB override for Series S heap 2 gr…
raylitebull Nov 30, 2026
150bdef
Merge remote-tracking branch 'upstream/amd-dev' into merge/amd2main-sync
lucsoft Dec 1, 2026
96f86e2
Merge remote-tracking branch 'upstream/main' into merge/amd2main-sync
lucsoft Dec 1, 2026
cdad10f
VFS: keep the views kernelx::lazy::ensure opens until the I/O is done
lucsoft Dec 1, 2026
944d991
Tests: keep the graphics reload test's loaded values live
lucsoft Dec 1, 2026
87edfef
Shaders: test split-program preparation with and without kept wholes
lucsoft Dec 1, 2026
82da371
Shaders: take the measured commit from kernelx's process counter
lucsoft Dec 1, 2026
41eaf19
Tests: adopt the list in the released-allocator dispatch chain test
lucsoft Dec 1, 2026
7ce7e80
Tests: expect the lazy middle tile to keep the CPU's bytes on copy back
lucsoft Dec 1, 2026
fae6f90
kernelx: skip alias tests where a fresh view's first write does not f…
lucsoft Dec 1, 2026
c909fb8
D3D12.X: let split chains' pieces read what the slicer wrote
lucsoft Dec 1, 2026
1becd37
D3D12.X: compile the indirect guard with DXC
lucsoft Dec 1, 2026
a3b6cf9
D3D12.X: cover tile mappings whose Signal failed
lucsoft Dec 1, 2026
d1ba113
D3D12.X: hand the title reserved textures with live page tables
lucsoft Dec 1, 2026
e78c0a4
D3D12.X: release PC allocators that had a heavy cycle
lucsoft Dec 1, 2026
9f173d9
D3D12.X: name the recorded work when the GPU wait watchdog fires
lucsoft Dec 1, 2026
b6aebe7
D3D12.X: keep amd-dev memory toggles off by default
lucsoft Dec 1, 2026
1bb6108
D3D12.X: let vram tests force zero-target-page fills
lucsoft Dec 1, 2026
dd6cec7
Merge remote-tracking branch 'upstream/main' into merge/amd-dev-into-…
lucsoft Dec 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ NOTE:
### Console DLLs from the game pack (session 5, without the exe)
The user provided 16 DLLs from chunk 1002 (`<samples>\*.dll`, ordinary PEs): the console CRT (vcruntime140(_1),
msvcp140(_1/_2/_atomic_wait/_codecvt_ids), concrt140, vcomp140, vccorlib140), Bink2Scarlett, XCurl, libHttpClient.GDK,
amd_fidelityfx_loader_xbox / amd_fidelityfx_upscaler_xbox, XboxBvhBuilder. The game exe (`game_scarlett_master.exe`) is still missing.
amd_fidelityfx_loader_xbox / amd_fidelityfx_upscaler_xbox, XboxBvhBuilder. The game exe is still missing.
- `xcl inspect`: after fixes **0 missing imports in all 16**. Added:
- `XMemVirtualQuery(process, address, info) → BOOL` (signature from the call sites in XboxBvhBuilder, objdump from msys64):
info = MEMORY_BASIC_INFORMATION + a field @48, bits 0–1 = memory readable by the CPU (message on error:
Expand Down
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ A gamepad is recommended ([Controls](#controls)). The game folder is never modif
|---|---|---|---|
| **PE loader** | ✅ | relocations, imports by name / ordinal / delay-load, TLS callbacks, exception tables, game DLLs, data-driven import routing (HLE / Windows / stub) | the game's 16 console DLLs load with 0 unresolved imports |
| **kernelx** | ✅ | title memory (budget from MicrosoftGame.Config, physical pages), threads on the PC's processors, modules, OS / console info | unit + end-to-end tests |
| **Memory** | ✅ | title graphics memory shared by CPU and GPU without copies, up to 16 GB (4 GiB windows) | GPU tests: loads, stores and atomics across windows |
| **Memory** | ✅ | title graphics memory shared by CPU and GPU without copies, up to 16 GB (4 GiB windows); XMem graphics requests for 2 MiB pages round to 2 MiB boundaries | GPU tests: loads, stores and atomics across windows |
| **File system** | ✅ | console paths (`GAME:`, `G:`, `D:` …) → the game folder; writes go to an overlay, the game folder is never modified; the console's drives: `S:\` (persistent local storage) and `T:\` (temp) in the title's data folder; free disk space answered for console paths | end-to-end: the test title's folder stays byte-identical; PLS and free space through the real call path |
| **DirectStorage** | ✅ | the console's DirectStorage queues: file and memory sources, queued event notifications, zlib, and BCPack – the console's texture compression – for BC1, BC3, BC4, BC5, BC6H and BC7 (BC2 and the hardware swizzle are refused) | unit tests on synthetic streams; retail BCPack chunks of all six modes byte-identical with a reference decoder (`XCL_SAMPLE_BCPACK`) |

Expand Down Expand Up @@ -377,9 +377,9 @@ Fill the reusable DXIL cache ahead of a run with the read-only package wrapper.
scratch buffer of at most `XCL_SPLIT_SCRATCH_MB` (default 256); the chains of one recording
share it, and `XCL_SPLIT_SCRATCH_TOTAL_MB` (default 384) bounds what all recordings not yet
reset hold together (past it a dispatch runs in smaller slabs).
- Huge pipelines (translated DXIL of `XCL_HUGE_PSO_BYTES` or more, default 262144) built on the
- Huge pipelines (translated DXIL of `XCL_HUGE_PSO_BYTES` or more, default 65536) built on the
background `xcl-pso*` workers take turns in the driver's compiler: `XCL_HUGE_PSO_CONCURRENCY`
at once (default 1, maximum 64). Pipelines of 4 MiB or more use a separate one-wide lane so
at once (default 2, maximum 64). Pipelines of 4 MiB or more use a separate one-wide lane so
they cannot occupy the ordinary huge-pipeline slot; one of them can therefore run next to the
ordinary ones, and each gated compile starts only with 3 GB of commit free. Smaller pipelines
and those a game thread waits for never wait. `xcl.log` shows each huge one as a numbered
Expand All @@ -404,15 +404,30 @@ Fill the reusable DXIL cache ahead of a run with the read-only package wrapper.
those on which the GPU completed at least one operation. For each, it names the translated
pipeline bound at the last operation DRED saw complete and those bound after it, by their
console shaders' hashes (`cs`, `vs` / `ps`, `ms` / `ps`, `vs` / `gs` / `ps`).
- `XCL_TEXTURE_LEVEL_PAGES=1` gives sampled title textures backing as their mip levels stream in.
Zero-filled mip uploads in a batch share one staging span and still clear any mapped tiles.
- Sampled title textures get backing as their mip levels stream in (`XCL_TEXTURE_LEVEL_PAGES=0`:
all levels at once). Zero-filled mip uploads in a batch share one staging span and still clear
any mapped tiles.
- `XCL_DSTORAGE_PARALLEL_DECOMPRESS=1` enables parallel CPU decompression for file-backed zlib
requests with virtual destinations. Defaults: four workers and a shared 32 MiB staging budget
(`XCL_DSTORAGE_WORKERS`, `XCL_DSTORAGE_MEMORY_BUDGET_MIB`). Requests retire in queue order.
- The queue's page mappings (`CopyPageMappingsBatchX`: a title maps the pages its texture streaming
fills into its GPU views) are applied: a GPU-view page shows the physical page mapped into it.
`XCL_PAGE_MAPPINGS=0` turns them off (the call is ignored and a GPU-view page shows its CPU view at
the same offset, as before).
- `XCL_DEFER_PRIVATE_HOME_TILES` keeps physical-page home storage used only by CPU/storage
transfers from acquiring a second sparse GPU copy. Explicit home mappings expose and upload
the existing bytes before the next submission, even after an earlier write-watch scan.
Already-exposed homes keep their normal behavior. On by default (`=0` turns it off); this
reduces avoidable backing, not the memory needed by live GPU mappings, and is not a VRAM
budget cap.
- Memory on 32 GB PCs: Windows charges every byte of video memory to the system's commit (RAM +
page file), so video memory XCL does not need counts like RAM. These are on by default to keep
it down: a streamed texture's levels get video memory when they are loaded
(`XCL_TEXTURE_LEVEL_PAGES=0` gives every level its memory at once), small sampled textures share
4 KiB placements (`XCL_SMALL_TEXTURES=0`: a committed resource each), and 64 MB of idle texture
upload buffers are kept (`XCL_UPLOAD_KEEP_MB`). Shader preparation starts no more workers than
the RAM available holds (2 GB each, 4 GB left over) and the commit left (3 GB each);
`XCL_PREPARE_WORKERS=N` sets the number.
- Every run writes `report.json` (called stubs, unknown D3D12.X slots and interfaces, XGameRuntime
classes asked for, shader statistics, audio formats, crash).
`d3d12.presents` counts presentations, not visible content. With `XCL_FRAME_DUMP=N` (`N > 1`),
Expand Down
3 changes: 3 additions & 0 deletions THIRD_PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ carry a note in their header about its origin and the date of changes (GPL-3.0
| [AMD Machine-Readable GPU ISA](https://gpuopen.com/machine-readable-isa/) | MIT | `crates/xcl/src/gpu/rdna2_spec.rs` (generated by `scripts/gen_rdna2.py`) | encoding and instruction tables |
| [AMD addrlib](https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/amd/addrlib) (Mesa) | MIT | `crates/xcl/src/gpu/tiling_tables.rs` (generated by `scripts/gen_tiling.py` from `gfx10SwizzlePattern.h`); GFX10 mip chain / mip tail layout in `gpu/tiling.rs` (after `Gfx10Lib::ComputeSurfaceInfoMacroTiled`) | swizzle tables; layout logic ported with annotation |
| [VIctory](https://github.com/Marvisak/VIctory) | GPL-3.0 | `crates/xcl/src/hle/bcpack/`: port of its `victory-formats/src/bcpack.rs`, and `tables.rs` generated by `scripts/gen_bcpack_victory_tables.py` from its `bcpack-tables.bin` (the format's constant tables; its 128 rANS models are those of Microsoft's [silicon-rans](https://github.com/microsoft/silicon-rans) sample, MIT) | port to Rust; tables |
| [Vice-Tay](https://github.com/TaynanGT/Vice-Tay) | GPL-3.0-or-later | `crates/xcl/src/gpu/rt_leave_out.rs` (the programs left out); `crates/xcl/src/hle/d3d12x/ambient.rs`: the cells and their slow mean, and the stand-in for the indirect light made in space – `LIGHT_PLACE_HLSL`, `LIGHT_GATHER_HLSL`, the depth path of `AMBIENT_FILL_R9G9B9E5_HLSL`, `AIR_CAP_HLSL` and the resolve's descriptor slots, after `place`, `gather`, `raise`, `clear_air`, `LIGHT` and `DEPTH` of its `ambient.rs` (commit 99a7f9b) | port of the HLSL into XCL's ambient pass (2026-11-28) |
| [VIctory-Neo](https://github.com/KyleS98/VIctory-Neo) | GPL-3.0-or-later | `crates/xcl/src/hle/d3d12x/mirror.rs`: the light around a mirror's view – the programs' parts by name, `XCL_MIRROR_AMBIENT` and the pass and its programs, after its `crates/victory-gpu/src/mirror.rs` (commits a3af274, 9b61dc9); `crates/xcl/src/hle/d3d12x/depth_uav.rs`: a depth plane brought up to date from its twin before the draws that test against it, after 7da5c9d; `crates/xcl/src/hle/d3d12x/ambient.rs`: the reflections' hold to the light around and their resolve slots (3aca295), the bound on transparent surfaces' light (`CS_SpatialFilterAlpha`, a6e85c6) and the probes' blue garbage test, after its `crates/victory-gpu/src/ambient.rs` at bdc3f38; the stand-in for reflections that found nothing (`MISS_LIGHT_HLSL`, `XCL_AMBIENT_SPECULAR`, the `CS_RayMiss` slots and layers), after its `Role::Miss`, `reflect_light` and `VICTORY_AMBIENT_SPECULAR` at bdc3f38 | port adapted to XCL's passes and state (2026-11-29) |
| Whiplash (Belobug's lineage, VIctory PR #63; a snapshot, `Kalmarv/whiplash` 699f191) | GPL-3.0-or-later | `crates/xcl/src/hle/d3d12x/ambient.rs`: one bounce of the title's own light (`XCL_AMBIENT_ONCE`: the fill's notes at the places the keep reads, and the keep counting each place by them), after `VICTORY_AMBIENT_ONCE` in its `Whiplash-NVIDIA/crates/victory-gpu/src/ambient.rs`; the ideas of `XCL_AMBIENT_SPECULAR_ALPHA`, `XCL_AMBIENT_MEAN_CLEAN` and `XCL_AMBIENT_DITHER`, after its `VICTORY_AMBIENT_SPECULAR_ALPHA`, `VICTORY_AMBIENT_MEAN_CLEAN` and `VICTORY_AMBIENT_DITHER`; `crates/xcl/src/hle/d3d12x/title_textures.rs`: the idea of `XCL_BAKE_AT_SUBMIT`'s whole upload of a bake's sources as title memory has them just before the bake, after `early_budgets` and `bake_exact` in its `Whiplash-AMD/crates/victory-gpu/src/draw.rs`; `crates/xcl/src/title_patch.rs`: the title's upscaler picker (its offset and bytes, `mov eax, kind; ret`: `XCL_UPSCALER`), after `VICTORY_UPSCALER` in its `Whiplash-AMD/crates/victory-loader/src/resolution.rs` (VIctory PR #53) | re-implemented on XCL's passes; what the keep takes out is XCL's; the picker's bytes are the title's, applied only where they match (2026-11-30) |
| [LLVM](https://github.com/llvm/llvm-project) | Apache-2.0 WITH LLVM-exception | `tests/data/llvm-amdgpu/*` (test data, not part of the program); GFX10 buffer format values (`UfmtSymbolicGFX10`) in `gpu/recomp/emit.rs` | test vectors; hardware facts |
| [WinDurango](https://github.com/WinDurango/WinDurango) | LGPL-3.0 | no code; d3d12_x.dll export numbers (facts) in `crates/xcl/data/stubdb.toml` | reference only |
| [libHttpClient](https://github.com/microsoft/libHttpClient) | MIT | no code; XTaskQueue/XAsync contract | specification |
Expand Down
1 change: 1 addition & 0 deletions crates/xcl/benches/gpu_cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ fn graphics_options(split_wave64: bool) -> recomp::Options {
outputs: Vec::new(),
input_ena: 0,
attrs: None,
early_depth: false,
}),
wave64: true,
split_wave64,
Expand Down
115 changes: 113 additions & 2 deletions crates/xcl/src/eh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ unsafe extern "system" fn unhandled_filter(info: *const EXCEPTION_POINTERS) -> i
if !ctx.is_null() {
let c = &*ctx;
let mut seen: Vec<usize> = Vec::new();
for (n, v) in [("rax", c.Rax), ("rbx", c.Rbx), ("rcx", c.Rcx), ("rdx", c.Rdx), ("rsi", c.Rsi), ("rdi", c.Rdi), ("rbp", c.Rbp), ("r8", c.R8), ("r9", c.R9), ("r10", c.R10), ("r11", c.R11), ("r12", c.R12), ("r13", c.R13), ("r14", c.R14), ("r15", c.R15)] {
let fault = if rec.ExceptionCode as u32 == 0xC000_0005 && rec.NumberParameters >= 2 { rec.ExceptionInformation[1] as u64 } else { 0 };
for (n, v) in [("the fault address", fault), ("rax", c.Rax), ("rbx", c.Rbx), ("rcx", c.Rcx), ("rdx", c.Rdx), ("rsi", c.Rsi), ("rdi", c.Rdi), ("rbp", c.Rbp), ("r8", c.R8), ("r9", c.R9), ("r10", c.R10), ("r11", c.R11), ("r12", c.R12), ("r13", c.R13), ("r14", c.R14), ("r15", c.R15)] {
let p = v as usize;
if p < 0x1_0000 || seen.contains(&(p & !0xFFFF)) {
continue;
Expand All @@ -123,16 +124,55 @@ unsafe extern "system" fn unhandled_filter(info: *const EXCEPTION_POINTERS) -> i
if !d.is_empty() {
crate::xlog_error!("page of {n}={p:#x}: {d}");
}
let g = crate::hle::kernelx::given_up::describe(p);
if !g.is_empty() {
crate::xlog_error!("{n}={p:#x}: {g}");
}
// which memory it is, and what it holds there
if crate::gpu::shader::readable(p & !7, 64) {
let kind = match crate::gpu::uma::get() {
Some(u) if u.is_sparse(p) => "a sparse window",
Some(u) if u.is_view(p) => "a GPU view",
Some(u) if u.is_committed(p) => "the coherent window",
Some(u) if u.contains(p) => "unified memory",
_ => "outside unified memory",
};
let words: Vec<String> = (0..8).map(|i| format!("{:016x}", ((p & !7) as *const u64).add(i).read_unaligned())).collect();
crate::xlog_error!("memory at {n}={p:#x} ({kind}): {}", words.join(" "));
if kind != "outside unified memory" {
crate::xlog_error!("buffer views compute dispatches were given over {n}={p:#x}: {}", crate::hle::d3d12x::real::dispatch_views_over(p));
// the neighbourhood, as dwords: what was written over an object shows its
// extent and stride (single words, records, a block)
let from = (p & !15).saturating_sub(192);
if crate::gpu::shader::readable(from, 448) {
for row in 0..7 {
let at = from + 64 * row;
let w: Vec<String> = (0..16).map(|i| format!("{:08x}", ((at + 4 * i) as *const u32).read_unaligned())).collect();
crate::xlog_error!(" {at:#x}: {}", w.join(" "));
}
}
}
}
}
crate::xlog_error!("page events so far: {}", crate::hle::kernelx::pagelog::counts());
}
crate::report::write_final(Some(msg));
crate::log::flush();
}
match TITLE_FILTER.load(Ordering::Acquire) {
let verdict = match TITLE_FILTER.load(Ordering::Acquire) {
0 => 0, // EXCEPTION_CONTINUE_SEARCH
f => std::mem::transmute::<usize, unsafe extern "system" fn(*const EXCEPTION_POINTERS) -> i32>(f)(info),
};
// Continuing the search hands the process to Windows Error Reporting, which snapshots it for
// its dump: with a title's tens of GB committed, that doubled the system's commit charge in
// one second (measured: +24 GB). The report is written, so the process ends here with the
// exception's code (`XCL_WER=1`: Windows gets it as before).
if verdict == 0 && std::env::var_os("XCL_WER").is_none() {
let code = if info.is_null() || (*info).ExceptionRecord.is_null() { 0xC000_0005u32 } else { (*(*info).ExceptionRecord).ExceptionCode as u32 };
crate::log::flush();
windows_sys::Win32::System::Threading::TerminateProcess(windows_sys::Win32::System::Threading::GetCurrentProcess(), code);
}
verdict
}

static ORIG_NT_TERMINATE: AtomicUsize = AtomicUsize::new(0);
Expand Down Expand Up @@ -542,6 +582,76 @@ unsafe fn code_bytes_at(rip: usize, most: usize) -> usize {
(in_page + 1..=most).rev().find(|&n| crate::gpu::shader::readable(rip, n)).unwrap_or(in_page)
}

thread_local! {
/// the address this thread's last `monitorx` armed (rAX)
static MONITORED: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
}

/// `mwaitx` (ECX bit 1: EBX is a timeout in TSC ticks): waits here, without leaving the handler,
/// until the monitored quadword changes or about a quarter of a millisecond has passed (a late or
/// spurious wake-up is allowed: the title's loop checks and waits again). Returning at
/// once, as before, made a title's wait on a GPU fence two exceptions per turn of its loop – a
/// retail title's world: 61 000 turns a second on the thread that waits for the GPU.
unsafe fn mwaitx_wait(ecx: u32, ebx: u32) {
use std::arch::x86_64::{_mm_pause, _rdtsc};
const MOST_TICKS: u64 = 800_000;
let at = MONITORED.with(|m| m.get());
if at == 0 || !at.is_multiple_of(8) || !crate::gpu::shader::readable(at, 8) {
std::hint::spin_loop();
return;
}
let cell = &*(at as *const std::sync::atomic::AtomicU64);
let seen = cell.load(Ordering::Relaxed);
// (the title's own timeout is 1000 ticks, a pause: it is not kept, the quadword is polled)
let _ = (ecx, ebx);
let end = _rdtsc().saturating_add(MOST_TICKS);
while cell.load(Ordering::Relaxed) == seen && _rdtsc() < end {
_mm_pause();
}
}

/// Emulated console-only instructions by kind, logged every 2 s while there are any: each one is
/// an exception (kernel and back), so a title that runs them in a loop pays for it in frame time.
fn count_emulated(what: &crate::insn::ConsoleOnly, rip: usize) {
use crate::insn::ConsoleOnly as C;
const NAMES: [&str; 8] = ["clwb", "clzero", "rdpru", "monitorx", "mwaitx", "rdpid", "extrq", "insertq"];
static N: [AtomicUsize; 8] = [const { AtomicUsize::new(0) }; 8];
static LAST_MS: AtomicUsize = AtomicUsize::new(0);
static SITES: std::sync::Mutex<Vec<(usize, u64)>> = std::sync::Mutex::new(Vec::new());
let k = match what {
C::Clwb => 0,
C::Clzero | C::ClzeroLoop { .. } => 1,
C::Rdpru => 2,
C::Monitorx => 3,
C::Mwaitx => 4,
C::Rdpid(_) => 5,
C::Extrq { .. } => 6,
C::Insertq { .. } => 7,
C::Ud2 => return,
};
N[k].fetch_add(1, Ordering::Relaxed);
if let Ok(mut g) = SITES.try_lock() {
match g.iter().position(|e| e.0 == rip) {
Some(i) => g[i].1 += 1,
None if g.len() < 4096 => g.push((rip, 1)),
None => {}
}
}
let now = (crate::log::uptime() * 1000.0) as usize;
let last = LAST_MS.load(Ordering::Relaxed);
if now >= last + 2000 && LAST_MS.compare_exchange(last, now, Ordering::Relaxed, Ordering::Relaxed).is_ok() {
let counts: Vec<String> = (0..8).map(|i| (NAMES[i], N[i].swap(0, Ordering::Relaxed))).filter(|c| c.1 > 0).map(|(n, c)| format!("{c} {n}")).collect();
let top = SITES.lock().map_or(String::new(), |mut g| {
g.sort_by_key(|e| std::cmp::Reverse(e.1));
let t = g.iter().take(6).map(|&(a, c)| format!("{} x{c}", modules::describe_address(a))).collect::<Vec<_>>().join(", ");
let sites = g.len();
g.clear();
format!("{sites} places, most: {t}")
});
crate::xlog_info!("emulated console CPU instructions ({} ms): {}; {top}", now - last, counts.join(", "));
}
}

/// A title's STATUS_ILLEGAL_INSTRUCTION: an instruction the console's Zen 2 has and this CPU
/// lacks (`insn`) is emulated and stepped over (EXCEPTION_CONTINUE_EXECUTION); anything else is
/// logged with its code bytes and goes on to the title's handlers.
Expand Down Expand Up @@ -571,6 +681,7 @@ unsafe fn emulate_console_only(ctx: &mut windows_sys::Win32::System::Diagnostics
}
}
}
count_emulated(&what, rip);
let mut step = len;
match what {
ConsoleOnly::Ud2 => return 0,
Expand Down
Loading
Loading