| Age | Commit message (Collapse) | Author |
|
docs: align the other pages with the measured CreateDevice block size and slot 62/76 (D3D12-OTHER-PAGES-CONSISTENCY)
|
|
docs(d3d12_command_objects): 0x48/0x50 are heap handle getters on heap objects (D3D12-HEAP-HANDLE-SLOTS)
|
|
d3d12_xs: map console list slot 80 DispatchX to PC Dispatch slot 14
|
|
port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:
- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
fixtures are left out.
What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.
Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
|
Brings the D3D12 runtime branch (d3d12/, its launcher scripts and notes, and the pull requests reviewed and applied
on it) together with mandy's main.
Conflicts (67 files, none under d3d12/): docs/, make_game.py, runtime/, scripts/build_runtime.ps1, tests/ and
tools/. Every one takes main's side: main is where that code is maintained, and this branch's copies were older
states of the same files or the same pull requests in another form. tests/test_fspx_unpack.py is main's too, as it
tests main's tools/fspx_unpack.py. Nothing under d3d12/ is changed by the merge.
Checked before pushing: python -m compileall over make_game.py, tools and tests; make_game.py --help;
scripts/check_no_game_data.py over the files this adds to main; tests/test_text_write_line_endings.py. The
translator suite, the C++ runtime build and CI have not run on the result.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
|
The device, queue, list and fence proxies now take each slot's meaning
from data, runtime/shims/d3d12_xs_slots.h, built from victory-gpu
(device.rs:402-458, queue.rs:957-1001, list.rs:2055-2173,
fence.rs:141-154) and Leonida's own measurements, each entry citing its
source; static_asserts refuse two entries for one slot. VIctory's switch
(device.rs:149-168) picks the layout: a device created as ID3D12Device11,
as the title's is, gets the console layouts; any other keeps the PC order
that Leonida's PC-interface tests (device_proxy_test, queue_proxy_test,
tiny_frame) drive. This replaces the guessed +4 list rule and the
PC-order queue and fence proxies for the title.
Console layout:
- Queue: Signal 16, Wait 17, GetTimestampFrequency 18 -> PC 14/15/16;
GetDesc 28 -> PC 18; ExecuteCommandLists 10 and ExecuteX 35 -> PC 10
(list proxies unwrapped); Signal2X 34 -> PC 14; PresentX 32 -> the
device's present handler (set_present_handler), else S_OK, as VIctory
answers; markers 11-13 ignored; 23/24 (SuspendX/ResumeX) and 31
(CopyPageMappingsBatchX) refused as open; every other slot refused.
- Fence slot 12: the address of a 64-bit word kept at the real fence's
completed value. CPU Signal and GetCompletedValue update it at once; a
console queue Signal registers SetEventOnCompletion on one process-wide
event whose thread-pool wait re-reads the listed fences.
- Device: 25/26/108 take the return buffer first (V resource.rs:802-811,
840-849, 2583-2593; Leonida retail_boot_chain 3.1; the title faults at
26 without it), either order accepted; 48 takes the console queue
description {type, flags, engine/pipe, queue} (queue.rs:464-495); 69 is
ignored; 74/75 keep page pools; 127 -> PC CreateCommittedResource3 with
a PC description and ALLOW_DISPLAY cleared (CreateCommittedResource in
COMMON before Device10); 57 is refused with its output nulled; 12 makes
console list proxies; every allocator is wrapped and its slot 9 is
accepted; a slot from 44 on that no source names is refused instead of
reaching the PC method at that number.
- List: queries 28-30 -> PC 52-54, the +4 block 32-55, 61 ExecuteIndirect,
80 DispatchX -> Dispatch, 85/86 -> CopyTextureRegion/CopyResource,
129 -> DispatchMesh, 139 ResetX -> Reset, 146 -> Barrier; 51 and 70
(float arguments) through thunks with the real prototype; the 59 marker
and VIctory's hints and syncs ignored; the console List5/List6 ids
answered (the list is made as ID3D12GraphicsCommandList).
Both layouts: device 78-81 are VIctory's frame clock (frame.rs), not the
HLE stand-in that returned at once.
Where the sources disagree (evidence from the title wins):
- List: the +4 rule sent 56-58 to the PC queries, 60 to EndEvent and 31
to ExecuteBundle. VIctory has the queries at 28-30 and names none of
27, 31, 56-58, 60, which are now refused. Leonida's 59 marker (FSR DLL)
fits VIctory's newer layout, where ExecuteIndirect moved to 61.
- Device 48: retail_boot_chain 3.2 read a PC description and had to
clamp Flags; VIctory's layout explains it (the pipe lands there).
- Device 75: PC CreateCommandQueue1 in Leonida, UnregisterPagePool in
VIctory: VIctory's in the console layout.
- Device 45/46/50: PC Device1/3 methods in Leonida; console methods
nobody names per VIctory's counts: refused in the console layout.
- Device 67: VIctory leaves it unimplemented with the same (desc, iid,
out) shape; Leonida's DeserializeComputePipelineStateX (FSR DLL) stays.
- Queue GetDesc: VIctory takes `this` first (queue.rs:950), the device's
struct returns take the buffer first; the queue accepts both.
- Frame clock: the stand-in made a token on every poll and refused a null
token; VIctory's (S_FALSE time-outs, a token only with flag 2) paces
the title.
Open: list 62, 71-74, 100 and 148 still return 0 (no Vulkan-layer path
for title addresses); queue 23/24/31 and device 61/70/71/86 refused;
XboxPresentation is not attached (gta6rt has no window, and its
FramePacer issues its own tokens and models only the origin event); a
title write to the fence word does not move the fence. Not run on the
title: it stops earlier, while DirectStorage is being ported.
Tested (MSVC 19.44, RelWithDebInfo, no Vulkan headers): xs_proxy_mock_test
checks every console queue (128) and list (160) slot against the tables
and through the proxies, the struct returns in both orders, 48, 69,
74/75, 127, 57, the refused device slots, the fence word with deferred
signals, PresentX and the frame clock (40 runs, no failure);
device_proxy_test runs the console layout on WARP. ctest: 116 of 117 pass
without loader; root_sig fails on the base commit too, and loader (no
D3D12 code) times out here. The Vulkan-only tests were not built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
slot 62/76 (D3D12-OTHER-PAGES-CONSISTENCY)
|
|
(D3D12-IID-INVENTORY-RETAIL)
|
|
#622's rows had slots 73 and 74 as no-ops and the GPU-label path as the
only writer of 71 and 72. Under #1723 the list values record all four
for the lists they track (waits included), and LEONIDA_GPU_LABELS=1
writes 71/72 only for the others. The command-object table, the value
write paragraph, §5.5 of the console ABI notes and the README row now
say so, and name the arena and xmem fallbacks (src/value_write_sink.h).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
|
|
The four rows of the measured console list slots, with the slot numbers the retail title's trace gives and the attribution of the call shapes and the write model.
|
|
(RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.
Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.
Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.
Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.
No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.
Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
|
|
|
rebase and split)
With it, d3d12_xs reads list slot 48 as the console's IASetVertexBuffers, so the PC-shaped fixture list's
ClearRenderTargetView never runs and Close fails. The branch also changes runtime/src/pe_loader.cpp and carried
committed conflict markers in docs/fssm_crosscheck.md. Its docs rows go with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
# docs/d3d12_vulkan.md
|
|
way, every failed call logged
A tester on #3951 saw a slot-67 lookup miss with the real FidelityFX DLL where the base build had none, and read it as
the proxy taking one program's kind 6 with another program's kind 0.
Pinned from the DLL's code and run on all 29 payloads: its FSPX reader (0x1a20) and the same loop inline for a
container store kinds 0, 1, 6 and 7 in four pairs from one payload, and the pipeline function copies them to +0x08,
+0x18, +0x28 (the kind-6 copy, with kind 6's own size at +0x30) and +0x38 of the description. That is the layout the
proxy reads, and code and state of one call always come from the same program. A harness that maps the DLL without
running it, calls its reader on each payload and builds the description that way resolves every translated program
to its own entry through slot 67 on the Vulkan device (26 of 29 on main aa2988cc; the other 3 are refused), on
llvmpipe, the integrated GPU and the RX 7900 XTX.
So the proxy does not mix programs. What fits the report: with slot 11 answered, the DLL goes on to its next pipeline,
which that translation (20 of 29) does not have; only the first call of a slot is announced, so the miss read as the
first call's.
- d3d12_xs_device.cpp: every failed slot-67 call is logged with its number and the four sizes.
- d3d12_fspx_compute_test: dll_slot67 builds the description from a container's own directory the way the DLL does
(reader pair order, pointers into the payload, kind 6 copied into a 256-rounded buffer padded with 0xcc); each
program resolves to its own translation with its own state. A proxy that read kind 0 from +0x18 or kind 6 with
the rounded size fails the test.
- docs/fspx.md, d3d12_command_objects.md, d3d12_vulkan.md: how the layout was pinned, and what happens when a later
program is not translated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The call-site scan tools/d3d12_guid_sites.py enumerates every 16-byte constant
a module's code can name (RIP-relative lea targets, absolute data pointers,
adjacent movabs immediates, import-slot loads) and classifies it against the
SDK's IID set. Over the 16 modules of the 1.0.2.1 package only the ten known
IIDs of the two D3D12 clients appear; no unknown GUID exists at any call site,
no module imports IID data, and no code-referenced static queue description
carries a list type outside the PC enum. The compute/copy console list IIDs
and the DMA type's numeric value therefore have no static source in the
package (consistent with #3520's export-table negative) and stay reachable
only through the running title.
|
|
The Xbox D3D12 row listed buffer views, root signatures, pipelines,
draws, placed resources, 1D textures and a swapchain as missing — all
implemented — and predates the console list proxy, the PresentX wiring
and the upload arena. The slot-148 note now describes the arena and VA
translation that replaced the "must" wording.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
|
0, measured (RT-99)
- d3d12_command_objects.md section 3.5a: slot 67 now passes all four pairs; for slot 11, what the DLL does on failure
and with 0 (measured in its code), the object's shape, why no program needs a scratch size (measured over the 29),
what is implemented and what stays open.
- fspx.md: the slot-67 payload and its checks, and slot 11.
- d3d12_vulkan.md and runtime/README.md: the new parts of d3d12_fspx_compute_test; the DLL's own dispatch was not run
here (fsr_dispatch_test needs MSVC structured exception handling).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
# Conflicts:
# docs/design.md
|
|
|
|
|
|
|
|
From the review on #3192: the FSR DLLs' exports are named and the tool that
listed them (dumpbin /exports) is given, so the measurement can be repeated,
and what §3.5 already says is a pointer instead of a repeat.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
D3D-360. Read statically on a 1.0.2.1 package whose 16 images all match
game/xbox-1.0.2.1.json: none of them is d3d12_xs.dll, which owns the
allocator's vtable. None contains IID_ID3D12CommandAllocator, and no export
takes an allocator: the BVH builder's take a device or a command list, and the
two FidelityFX DLLs export the five ffx* entry points. No shipped module
creates, receives or calls an allocator, so only the game executable could
show a call past slot 8, and the proxy keeps logging and refusing those.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
checks the cursor limit
The package's DLLs check before every inline write (BVH builder 196/196, FSR 9/9), so a layer that keeps
the cursor at the limit sees every command. Whether the game's executable does the same was open until it is
available; inline_scan answers it in one pass over a dumpbin listing. Baseline in d3d12_command_objects.md,
day-one step in design.md.
|
|
The package ships no D3D12 runtime (d3d12_xs.dll is part of the console OS),
and the device clients it does ship never create a queue, allocator, command
list or fence: neither XboxBvhBuilder.dll nor amd_fidelityfx_upscaler_xbox.dll
contains those IIDs or imports GUID data from d3d12_xs.dll, and none of their
indirect calls at 0x40/0x48/0x60/0x120 is made on the device. The callers are
in the game executable, so the slots stay Open.
tools/d3d12_iid_scan.py reports which ID3D12 IIDs (from the SDK's d3d12.h) an
image contains and what it imports from d3d12_xs.dll, warning on imports that
could be IID data. It prints names and counts only.
docs/d3d12_command_objects.md section 2.1 records the result with counts and
how each column was measured. tests/test_d3d12_iid_scan.py covers the tool on
a hand-written header and hand-built PE images (no game files).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
batched-build slot map corrections (D3D-293)
Extends section 7 with the CPU-side geometry descriptor validation that gates
BuildRaytracingAccelerationStructureBatched2X before the first list-vtable call
(the step the D3D-293 dynamic logging proxy stopped at), integrates the static
iced-x86 cross-check results: undocumented slot 90 (+0x2d0) as the worker's first
list call, the +0xd0 barrier being bss-gated (never fired in the shipping DLL),
the +0x490 global UAV barrier group, and slot 148 (count * 40) upload allocation.
Fixes D3D-293.
|
|
The later review pass added the 0x1d047 call with 0x8020 to the same 0x149ba row; keep that one and remove the older short copy.
|
|
# Conflicts:
# docs/d3d12_command_objects.md
|
|
- move the new notes after the list-setup paragraph instead of splitting it
- list the fourth slot-80 fallback (0x1d047, W = 0x8020) in the section 3.3a row and the bullets
- write the header as table[root] + ((count - 1) << 16)
- say what is read from the code (the slot-80 fallback) and what stays inferred (slot 80's meaning)
|
|
|
|
The header word is the root parameter's entry at +0x344 + 4*root. For
several 32-bit constants the builder adds (count - 1) << 16 (0x120000 for
19, 0x70000 for 8, 0x30000 for 4); for one constant at a non-zero offset
it adds 4 * destOffset (0xc at 0x19fca, 0x14 at 0x1a346, matching their
slot-37 fallbacks (2, value, 3) and (2, value, 5)). Descriptor tables and
root CBV/SRV/UAV write the entry unchanged, then 4 bytes or the full
8-byte address. Every reader tests the entry against 0xC0000000 (98 sites
in the builder, 7 in the FSR DLL) and sets +0x140 only when both bits are
clear.
|
|
Section 3.5a names the four-word inline dispatch. The BVH builder also
writes a five-word form, 0x4003cc00, x, 1, 1, W, at 0x14972, 0x15215,
0x1536a and 0x1d002. It is the inline form of console slot 80: when the
buffer is full each site calls +0x280 with the same (x, 1, 1, W). W is
0x8020 at two sites and 0x20 at the other two.
Byte +0x143 is read at 31 sites in the builder and one in the FSR DLL
and written by neither; every store into +0x140..+0x143 is a byte store
to +0x140 or +0x141. A replacement list can leave it 0. The slot-80 row
of section 3.3a points at the packet and the 0x20 calls.
|
|
Section 3.5a names the four-word inline dispatch. The BVH builder also
writes a five-word form, 0x4003cc00, x, 1, 1, W, at 0x14972, 0x15215,
0x1536a and 0x1d002. It is the inline form of console slot 80: when the
buffer is full each site calls +0x280 with the same (x, 1, 1, W). W is
0x8020 at two sites and 0x20 at the other two.
Byte +0x143 is read at 31 sites in the builder and one in the FSR DLL
and written by neither; every store into +0x140..+0x143 is a byte store
to +0x140 or +0x141. A replacement list can leave it 0. The slot-80 row
of section 3.3a points at the packet and the 0x20 calls.
|
|
The paragraph still said 13, from before the dot-product rule (#1754). docs/fspx.md, "Translation status", has 17
and lists what stops the other 12; the paragraph now points there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
# Conflicts:
# docs/d3d12_command_objects.md
|
|
kind-6 bytes (RT-99)
The FidelityFX DLL creates its compute pipelines from FSPX programs (docs/fspx.md): through slot 67 with the bare
kind-6 program, then through slot 62 with the DXBC container whose ACCC part holds the payload. Both ended in
E_INVALIDARG: the layer took only FSSM bytecode, the build never translated the DLL and the index had no key for it.
- make_game.py: the shaders stage unpacks the package's DLL with tools/fspx_unpack.py --disasm into
<work>/shaders/fspx and translates it into <work>/shaders/spirv/fspx, with the same wave64 mode and fallback
flags. The step is redone as a whole when the DLL, its tools, llvm-mc or the flags change (fspx_build.json,
written last) and never makes the game's shaders run again.
- tools/shader_meta.py: an entry of a program without an FSSM blob gets fspx_code_sha256, the SHA-256 of
fspx/<name>.code.
- runtime/src/shader_library.h: the library also loads <dir>/fspx/index.json and finds entries by
fspx_code_sha256. compute_program() takes an FSSM program as before, the kind-6 bytes of an ACCC container or of a
bare FSPX payload, and a bare kind-6 program recognized by its prologue; the directory is parsed with the DLL
reader's rules and bounds-checked, so a malformed one is refused.
- create_compute: looks the program up by the key of its kind and uses those bytes as the code base.
- Tests: shader_library_test (parsing, malformed directories, lookup, the fspx folder), d3d12_fspx_compute_test
(PSOs from both forms, a dispatch each, refused inputs) and tests/test_fspx_shaders_stage.py.
- Docs: the lookup in docs/fspx.md; slots 62 and 67 in d3d12_command_objects.md and d3d12_vulkan.md. The size the
slot-67 description carries at +0x30 is kind 6's own size, read from the DLL's code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
|
|
Device slot 9 (CreateCommandAllocator) now returns an allocator proxy,
the fourth command object after the queue and fence (BUILD-231) and the
list (D3D-136): the public chain (9 slots, Reset at 8) is forwarded, a
slot past it up to the end of a 64-slot table is logged and refused with
E_NOTIMPL, and a read past the table faults in its own guard region. The
console allocator's extra methods are not measured and not guessed.
A list takes the title's allocator in CreateCommandList and Reset, so a
proxy is only safe where the list side resolves it. Slot 9 therefore
wraps an allocator only when it answers kLeonidaCommandAllocatorTag (the
Vulkan layer's CommandAllocator, whose from() resolves the proxy for both
calls); a PC runtime allocator is handed out unchanged, logged once,
until a command-list proxy unwraps it at Reset. Allocator proxies are
unwrapped in the residency calls like heap, queue and fence proxies.
Device slot 12 is not touched.
Tests: allocator_proxy_test (WARP, a hardware adapter, the Vulkan device:
forwarding, refused tail, guard region, identity, D3D12's allocator rules,
a list created and Reset on the proxy with GPU copies through the queue
and fence proxies read back), mock cases for allocators with and without
the tag and their failure paths, and device_proxy_test's slot-9
expectations. No game files.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
CreateComputePipelineState (RT-99)
Xbox device slot 67 takes (desc, riid, out) with IID_ID3D12PipelineState and a console-only
descriptor with the root signature at +0x00 and code blob pointer/size at +0x28/+0x30.
Previously it logged and returned E_NOTIMPL.
Route it to CreateComputePipelineState on the PC device (slot 11) like slot 62, mapping the
console descriptor to D3D12_COMPUTE_PIPELINE_STATE_DESC. On the Vulkan device this resolves
through the translator via fssm_program and ShaderLibrary.
- Implement proxy_create_compute_pipeline_from_native_code in d3d12_xs_device.cpp
- Update device_proxy_test to verify slot 67 thunk, compute PSO creation over WARP, and argument checks
- Update d3d12_compute_test to verify slot 67 compute PSO creation on the Vulkan device
- Update documentation in d3d12_command_objects.md and d3d12_vulkan.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
|
|
|
|
d3d12_command_objects.md 3.5a: slot 67 is DeserializeComputePipelineStateX
with its full desc (kind 0, 1, 6, 7 pointer/size pairs), and the open
"what FSPX holds" line now points at fspx.md (13 of 29 translate).
d3d12_vulkan.md A.3: the same name, and the throw: before #965 it carried
an image base of 0; with #965 it carries the DLL's base and still reaches
the caller (fsr_dispatch_test, LEONIDA_FSR_NO_STANDIN=1).
|
|
|
|
|
|
copy switch
Static reading of the FSR DLL's call sites, added to section 3.5a:
- 54 is ClearUnorderedAccessViewFloat and 55 DiscardResource (both +4).
- 59 is one console slot with a bool first argument, used for both ends of a
GPU event; the two slots the console lacks are among 56-60.
- 85 takes the six CopyTextureRegion arguments (two copy locations), not one
pointer: buffer-to-texture with a footprint from device slot 38, or
texture-to-texture.
- Pipeline slot 11 (console-only) gives a per-pipeline scratch value; the
largest times 0xd0 sizes FFX_XBox_ComputeScratch, and slot 141's fourth
argument is the bound pipeline's value.
- A byte at device +0x18 selects between the DLL's own 32-byte descriptor
copy and device slot 24 CopyDescriptorsSimple.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Re-read the BVH builder's command-list call sites in the console order of section 3.5a:
+0x108 is SetComputeRootSignature, +0x138 SetComputeRoot32BitConstants and +0x168
SetComputeRootUnorderedAccessView (the PC-order readings SetComputeRoot32BitConstant,
SetComputeRootShaderResourceView and SOSetTargets do not fit the argument registers or the
inline writes). RDX at the +0xc8 call is the pipeline. +0x490 (console slot 146) is the
public enhanced Barrier with one global compute-to-compute UAV barrier.
New section 3.3a: slots 37/39/43/45 at other sites, 148 (upload allocator whose pointer is
used as the GPU address), 80 (dispatch with an extra word), 71/73 (label write/wait,
unreachable in the shipping DLL) and the second Barrier site.
|
|
Device slots 8 (CreateCommandQueue), 75 (CreateCommandQueue1), 36
(CreateFence) and 32 (OpenSharedHandle of a fence) now return queue and
fence proxies. They forward the public chain in PC order (19 queue slots,
11 or 12 fence slots), refuse and log a slot past it up to the end of the
proxy's table, and name a read past the table through a guard region and
a vectored handler.
Heap, queue and fence proxies are unwrapped wherever a device or queue
method hands them to the real runtime: queue Signal/Wait, device slots
31/34/35/45/46/50. Arrays are copied without exceptions. QueryInterface
answers only the modelled interfaces, and logs one the real object has
but the proxy does not model. Outputs are cleared on failure as for
slots 14/62/76. --trace-d3d12 records proxy calls in the README grammar.
Every function a thunk hands its words to keeps them in the same
positions, because a title passes only as many as the method takes.
Tests: queue_proxy_test (host WARP, host hardware, Vulkan device;
differential per-process error cases, guard faults, identity, threads,
raw-slot client, child-runner self-test), xs_proxy_mock_test (older
devices, fences without Fence1, OpenSharedHandle branches, allocation
failures; three guard-setup fault modes), and device_proxy_test through
the D3D12XboxCreateDevice shim. No game files.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
XMemGetWorkingSetStatistics and device slot 67
amd_fidelityfx_upscaler_xbox.dll, measured with Ghidra 12.2 (through REA)
and run by fsr_dispatch_test on PC devices (RTX 2000 Ada and WARP) behind
the Xbox-ABI proxy.
Backend descriptor: the provider's create walks the chain for type
0x01000002, {header, device} with the device at +0x10, and ends in
FFX_API_RETURN_ERROR without it (what RT-3 got with 0x0200000x). With it
the DLL creates its backend through the proxy: device slots 14, 15, 18, 19,
27, 38 and 76 and heap slot 9, at the shapes the PC order and the measured
overrides predict; slot 76 takes the seven CreateCommittedResource
arguments. No earlier test here reached slot 76 or heap slot 9.
Two runtime bugs it found:
- XMemGetWorkingSetStatistics takes (kind, stats*): all seven call sites
pass kind 0x20000001 in ECX and a stack buffer in RDX. The one-argument
shim wrote to address 0x20000001.
- Device slot 67 is a console-only compute-pipeline call (a code blob in its
desc), not the PC CreateProtectedResourceSession1 the proxy forwarded it
to. The proxy now refuses it (E_NOTIMPL).
The context: on the RTX 2000 Ada the create stops at the DLL's HRESULT
check, because the driver refuses its R9G9B9E5_SHAREDEXP texture with
ALLOW_UNORDERED_ACCESS (WARP takes it). The test reports that stop and
retries with one PC stand-in (that texture as R32_UINT). On the context it
records one ffxDispatch into a logging command list that is never executed.
The console command list, from that run and the DLL's recorder (RVA
0x59a0), the same 13 calls on both devices: slots 14, 15, 25 and 26 at
their PC positions, then SetDescriptorHeaps at 32 (PC 28, seen in the run),
SetComputeRootDescriptorTable at 35 (PC 31), ClearUnorderedAccessViewUint
at 53 (PC 49, seen in the run), ExecuteIndirect at 61 (PC 59), and
console-only methods at 85 and 141. 33 and 41 fit SetComputeRootSignature
and SetComputeRootConstantBufferView by shape; the docs mark them inferred.
The logging list forwards only measured slots. The list object also carries
a write cursor and limits (+0x18, +0x28, +0x30) the DLL writes root
arguments and dispatches through while there is room; with the cursor at
the limit every command takes the vtable. These are the fields docs section
3.4 measured in the BVH builder without a meaning.
The dispatch stops at the DLL's compute pipeline: its 29 shaders are DXBC
with an ACCC part (payload tag FSPX) and no DXIL, and the PC runtime
refuses them at slot 62; the dispatch goes on with the null pipeline and
faults, which the test reports as the documented PC limit. Its C++ `throw`
also shows the loader gap: _CxxThrowException finds no image base for a
manually mapped image.
The test's fault report gives the faulting module and RVA, the access, the
C++ throw's ThrowInfo, image base and unwound stack, and the HRESULT the
DLL formatted with the DLL frames that made the failing call.
Docs: d3d12_vulkan.md Appendix A.3 and open question 2,
d3d12_command_objects.md 3.4 and 3.5a, design.md and runtime/README.md.
|
|
|
|
|
|
|