Skip to content

docs: builder command-list slots in console order; +0x490 is Barrier (slot 146) - #1469

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
CLHelper:docs/console-list-builder-slots
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
CLHelper:docs/console-list-builder-slots

Conversation

@CLHelper

@CLHelper CLHelper commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: new D3D item, #1380 (comment)

What and why

Docs only: docs/d3d12_command_objects.md and one row of docs/d3d12_vulkan.md. No code, no tests, no game data (RVAs, offsets, constants and short register excerpts only).

Section 3.3 read the BVH builder's command-list calls in PC order. Section 3.5a has since shown the console list is not in PC order past slot 26. Re-read in console order, with the argument registers at each call and the inline write each call falls back from, three of the section 3.3 readings were wrong and the unknown +0x490 is identified.

Corrections to section 3.3 (each now marked Measured, with the registers that decide it):

Site Offset Was (PC order) Now (console slot → PC method)
0x1d7f4 +0x108 33 SetComputeRoot32BitConstant 33 → 29 SetComputeRootSignature (one argument, the pointer stored next to the pipeline)
0x1d8b9, 0x1d956 +0x138 39 SetComputeRootShaderResourceView 39 → 35 SetComputeRoot32BitConstants (four arguments: index, count, source pointer, offset)
0x1d8f9 +0x168 45 SOSetTargets 45 → 41 SetComputeRootUnorderedAccessView (root index and a 64-bit address)
0x1d85e +0xc8 SetPipelineState, argument not proven argument proven: RDX=[rdi+8], the object the inline branch copies 28 bytes from
0x1da02 +0x490 method Open console slot 146 → GCL7 slot 80 Barrier: one global group, SyncBefore=SyncAfter=COMPUTE_SHADING (0x80), AccessBefore=AccessAfter=UNORDERED_ACCESS (0x10); the constant is 16 bytes at RVA 0xcdf60

New section 3.3a, other call sites through the list pointer in .text:

  • 37, 39, 43, 45 at further sites: the rest of the +4 compute root group.
  • 148: an upload allocator (size, alignment). Its returned CPU pointer is passed unchanged as a root SRV address (0x20f99), so console upload memory has one address for CPU and GPU. A replacement must return memory that is valid as both.
  • 80: a dispatch with an extra word (Inferred).
  • 71/73: a label write and a label wait (Inferred). They are used only when a .bss bool at RVA 0xd773c is set, and nothing in .text writes it, so in the shipping DLL the Barrier path runs.
  • A second Barrier site at 0xd7b4.

Follow-ups in the same file: §3.4 (the write at [rbx+0x544] is 32 bytes, not 16; +0x490 no longer Open), the §3.5a summary, the §4.3 Open list, the §5.3 table (only +0x350 remains unexplained), §5.4, §7 (the logging-proxy step now confirms rather than discovers), §8.2 sources. d3d12_vulkan.md §8.2 Q2 lists the new slots.

Relation to open PRs: #1325 (console-order list proxy) edits other hunks of the same file (§3.5a last paragraph, §5.2, §7 item 3) and does not conflict. Its proxy refuses 37/39/43/45/71/73/80/146/148; this PR gives their shapes. No open PR identifies +0x490.

What is not done

  • Not tested at runtime. No proxy run, no CTest, no build: the identifications rest on static disassembly only. Section 7 describes the logging-proxy run that would confirm them; it needs the package.
  • Slots 80, 71 and 73 stay Inferred: no public method has their shape. The 71/73 path is unreachable in the shipping DLL, so it cannot be observed there.
  • +0x350 (read once at 0x1d877) is still unexplained.
  • The FSR DLL's slots (54, 55, 59, 85, 141 detail) are not in this PR; they are a separate follow-up.
  • The branch is based on f85582e2. Main has moved; it merges cleanly onto current main (checked with git merge-tree), and none of the newer commits touch the edited sections. Not rebased.

Tested

Docs only. Every RVA, register and constant in the diff was re-read in dumpbin /DISASM output (MSVC 14.44, dumpbin 14.44.35230.0) of the shipped XboxBvhBuilder.dll (package 1.0.2.1, image base 0x180000000); the functions were first located with Ghidra 12.2. Enum values checked against SDK 10.0.26100 d3d12.h. Nothing was run; no GPU involved.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. RVAs, offsets, constants and short register excerpts only.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: docs only, no translator change.)

AI-assisted.

…(slot 146)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants