d3d12_xs: console list slot 139 is Reset (RT-LIST139) #396

Merged
Mumogg merged 7 commits from upstream-pr/396 into main 2026-11-25 00:13:39 +00:00
Mumogg commented 2026-11-24 04:31:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Mumogg on 2026-11-24T04:31:52Z.


Claimed in #14 as RT-LIST139. Depends on: #349 to #395 in order (their commits come first here; this pull request is the last commit). The change itself is three places in the list proxy and its test.

What and why

The retail title resets its command lists through list slot 139, with (allocator proxy, pipeline state). main's console_to_pc_list_slot has no entry for 139, so the call is recorded and dropped.

  • d3d12_xs_device.h: the map sends 139 to the PC slot 10.
  • d3d12_xs_device.cpp: the list proxy's unwrap keys on the PC slot instead of the console slot, so console slot 10 and console slot 139 both give the real list its real allocator (and a wrapped pipeline state the same way) and re-pin the inline cursor.
  • xs_proxy_mock_test.cpp: the map entry, and a slot 139 call that reaches the real list's slot 10 with the real allocator and never its slot 139.

This one is written by me, not cherry-picked: the mapping and the unwrap rule are those of ef9d0759d (Nolan Cotter; the call shape was measured by Pipodi), which does not apply to main's list proxy. The commit message credits it.

Measured

Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on main ece4ba5b3, with #142, #219, #328 and #387 applied on top for the boot runs (they are not in this branch).

--run Traced calls ok among them
up to #395 11,949 1,644
+ this 11,950 1,645

The extra call is the list's Reset, now reached.

This does not move the stop either. The run still ends right after the first ExecuteCommandLists ok, with the title writing through a null pointer of its own: it loads a pointer from one of its globals and stores a byte far into the object it expects there. So something the title sets up earlier is missing on this path, and it is not the list's Reset. I do not know yet what it is; the run of the integration branch (#321) at the same point goes on, and next I will narrow down which difference between the two matters (the memory shim is my first candidate, since #321 uses another one).

xs_proxy_mock_test under Wine passes.

Not built with MSVC and not run on Windows.

AI-assisted (Claude Code); built and run on the machine above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5466119833 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/396). Originally posted by [Mumogg](https://github.com/Mumogg) on 2026-11-24T04:31:52Z. --- Claimed in #14 as `RT-LIST139`. Depends on: #349 to #395 in order (their commits come first here; this pull request is the last commit). The change itself is three places in the list proxy and its test. ### What and why The retail title resets its command lists through list slot 139, with `(allocator proxy, pipeline state)`. `main`'s `console_to_pc_list_slot` has no entry for 139, so the call is recorded and dropped. - `d3d12_xs_device.h`: the map sends 139 to the PC slot 10. - `d3d12_xs_device.cpp`: the list proxy's unwrap keys on the PC slot instead of the console slot, so console slot 10 and console slot 139 both give the real list its real allocator (and a wrapped pipeline state the same way) and re-pin the inline cursor. - `xs_proxy_mock_test.cpp`: the map entry, and a slot 139 call that reaches the real list's slot 10 with the real allocator and never its slot 139. This one is written by me, not cherry-picked: the mapping and the unwrap rule are those of `ef9d0759d` (Nolan Cotter; the call shape was measured by Pipodi), which does not apply to `main`'s list proxy. The commit message credits it. ### Measured Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on `main` `ece4ba5b3`, with #142, #219, #328 and #387 applied on top for the boot runs (they are not in this branch). | `--run` | Traced calls | `ok` among them | |---|---|---| | up to #395 | 11,949 | 1,644 | | + this | 11,950 | 1,645 | The extra call is the list's `Reset`, now reached. **This does not move the stop either.** The run still ends right after the first `ExecuteCommandLists ok`, with the title writing through a null pointer of its own: it loads a pointer from one of its globals and stores a byte far into the object it expects there. So something the title sets up earlier is missing on this path, and it is not the list's `Reset`. I do not know yet what it is; the run of the integration branch (#321) at the same point goes on, and next I will narrow down which difference between the two matters (the memory shim is my first candidate, since #321 uses another one). `xs_proxy_mock_test` under Wine passes. Not built with MSVC and not run on Windows. AI-assisted (Claude Code); built and run on the machine above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
Mumogg commented 2026-11-24 04:32:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Mumogg on 2026-11-24T04:32:28Z.


Follow-up on my own guess above: it is not the memory shim. I swapped the integration branch's xmem.cpp into the measurement build and the run ends at the same call (11,950 traced, last ExecuteCommandLists ok) with the same fault. So that candidate is ruled out, and the difference is somewhere else in what the two trees do before the first submission.

One thing visible in the logs that I have not explained: at this point the integration branch's run shows a first call of list slot 74 between list slot 72 and WaitFrameEventX, and the run on main never calls it.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7122112671 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/396#issuecomment-7122112671). Originally posted by [Mumogg](https://github.com/Mumogg) on 2026-11-24T04:32:28Z. --- Follow-up on my own guess above: it is **not** the memory shim. I swapped the integration branch's `xmem.cpp` into the measurement build and the run ends at the same call (11,950 traced, last `ExecuteCommandLists ok`) with the same fault. So that candidate is ruled out, and the difference is somewhere else in what the two trees do before the first submission. One thing visible in the logs that I have not explained: at this point the integration branch's run shows a first call of list slot 74 between list slot 72 and `WaitFrameEventX`, and the run on `main` never calls it. AI-assisted.
3L1A5-1 commented 2026-11-24 23:46:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by 3L1A5-1 on 2026-11-24T23:46:55Z.


An independent confirmation of the slot-139 part, from another project's measurement (facts only, no code):

  • xcl (GPL-2.0-only, so nothing copied) measured the same console list layout on the retail 1.0.2.1 title: its slot numbers line up with main's map here (61 = ExecuteIndirect, 85 = CopyTextureRegionX).
  • There the title calls slot 139 as Reset(allocator, NULL, 0) on each list it takes from its pool, before recording. While the slot was a stub, the list stayed closed: every later call on it was refused and Close failed. So it matches this PR's mapping to PC slot 10, with the allocator unwrapped.

On current main (507029d1e) console_to_pc_list_slot(139) is still kListNotForwarded, so the call returns 0 and does nothing. Since this PR is needs rebase and touches 18 files, would you split the one-line slot-139 mapping (with the pc == 10 unwrap) into its own small PR? It would be easy to review and merge on its own.

AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7147787563 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/396#issuecomment-7147787563). Originally posted by [3L1A5-1](https://github.com/3L1A5-1) on 2026-11-24T23:46:55Z. --- An independent confirmation of the slot-139 part, from another project's measurement (facts only, no code): - xcl (GPL-2.0-only, so nothing copied) measured the same console list layout on the retail 1.0.2.1 title: its slot numbers line up with `main`'s map here (61 = ExecuteIndirect, 85 = CopyTextureRegionX). - There the title calls **slot 139 as `Reset(allocator, NULL, 0)`** on each list it takes from its pool, before recording. While the slot was a stub, the list stayed closed: every later call on it was refused and `Close` failed. So it matches this PR's mapping to PC slot 10, with the allocator unwrapped. On current `main` (`507029d1e`) `console_to_pc_list_slot(139)` is still `kListNotForwarded`, so the call returns 0 and does nothing. Since this PR is `needs rebase` and touches 18 files, would you split the one-line slot-139 mapping (with the `pc == 10` unwrap) into its own small PR? It would be easy to review and merge on its own. AI-assisted: yes.
aslan2142 commented 2026-11-25 00:13:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T00:13:41Z.


Merged. Mumogg is still away and this is the next rung on main's boot path, so I brought the branch up to date as with the rungs before it: one merge commit on top of 54ed404de (864337351), merging main with #391 and #395 in it. Mumogg's commit is untouched and nothing was force-pushed. There were no conflicts.

What it does: console list slot 139 now goes to the PC Reset (slot 10). The allocator proxy is unwrapped, a wrapped pipeline state would be too, and the inline cursor is re-pinned as for console slot 10. Before, the call was dropped with S_OK and the real list stayed closed.

How it is known: the slot is measured on the retail title, in ef9d0759d (in main's history, not in its tree): the title creates a list, closes it at slot 9, then calls 139 with (allocator proxy, 0). This PR rewrites that for main's list proxy.

Holds and requests: none on this PR.

Tests (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU):

  • Full Windows suite under Wine, the branch against main with #395: no test changed state on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU, on both sides).
  • xs_proxy_mock with its six variants and device_proxy pass on both devices.
  • check_no_game_data.py on the three changed files is clean. The Linux portable subset does not build these files.
  • Not run here: MSVC, native Windows, and the game itself. By Mumogg's run the boot gets one more ok call (11,949 to 11,950) and the stop does not move.

For later:

  • docs/d3d12_vulkan.md has no row for list slot 139; the row in ef9d0759d is ready to be brought over.
  • The new test passes pipeline state 0, so unwrapping a pipeline state is not exercised.
  • Still open from the RT-LIST139 finding in #14: list slot 74 is never called on main, and nothing is recorded after the first submission (slots 146 and 52).

#403 (queue slot 18) is the next rung.

AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7148285068 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/396#issuecomment-7148285068). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T00:13:41Z. --- Merged. Mumogg is still away and this is the next rung on `main`'s boot path, so I brought the branch up to date as with the rungs before it: one merge commit on top of `54ed404de` (`864337351`), merging `main` with #391 and #395 in it. Mumogg's commit is untouched and nothing was force-pushed. There were no conflicts. **What it does:** console list slot 139 now goes to the PC `Reset` (slot 10). The allocator proxy is unwrapped, a wrapped pipeline state would be too, and the inline cursor is re-pinned as for console slot 10. Before, the call was dropped with `S_OK` and the real list stayed closed. **How it is known:** the slot is measured on the retail title, in `ef9d0759d` (in `main`'s history, not in its tree): the title creates a list, closes it at slot 9, then calls 139 with `(allocator proxy, 0)`. This PR rewrites that for `main`'s list proxy. **Holds and requests:** none on this PR. **Tests** (clang-cl with the xwin SDK; Wine, headless; llvmpipe and an RDNA2 iGPU): - Full Windows suite under Wine, the branch against `main` with #395: no test changed state on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU, on both sides). - `xs_proxy_mock` with its six variants and `device_proxy` pass on both devices. - `check_no_game_data.py` on the three changed files is clean. The Linux portable subset does not build these files. - Not run here: MSVC, native Windows, and the game itself. By Mumogg's run the boot gets one more `ok` call (11,949 to 11,950) and the stop does not move. **For later:** - `docs/d3d12_vulkan.md` has no row for list slot 139; the row in `ef9d0759d` is ready to be brought over. - The new test passes pipeline state 0, so unwrapping a pipeline state is not exercised. - Still open from the `RT-LIST139` finding in #14: list slot 74 is never called on `main`, and nothing is recorded after the first submission (slots 146 and 52). #403 (queue slot 18) is the next rung. AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).
3L1A5-1 commented 2026-11-25 00:31:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by 3L1A5-1 on 2026-11-25T00:31:08Z.


Native Windows + MSVC result for the part not run above: Mumogg's 54ed404de on main 1154976d4 (no conflicts; same change as the merge), MSVC 14.44, Windows SDK 10.0.26100, Windows 11 26300, RTX 2060 SUPER (Turing, 8 GB, driver 617.14).

  • Full ctest: 318 / 318 passed (only the two SDL3 gameinput tests are disabled here), including xs_proxy_mock and its six variants.
  • Same suite on main before it: 316 / 316. scripts/run_gpu_tests.py on main: 207 pass / 49 skip / 0 fail, and with LEONIDA_W64_EMULATE=1 239 / 17 / 0.

AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7148590727 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/396#issuecomment-7148590727). Originally posted by [3L1A5-1](https://github.com/3L1A5-1) on 2026-11-25T00:31:08Z. --- Native Windows + MSVC result for the part not run above: Mumogg's `54ed404de` on `main` `1154976d4` (no conflicts; same change as the merge), MSVC 14.44, Windows SDK 10.0.26100, Windows 11 26300, RTX 2060 SUPER (Turing, 8 GB, driver 617.14). - Full ctest: **318 / 318 passed** (only the two SDL3 `gameinput` tests are disabled here), including `xs_proxy_mock` and its six variants. - Same suite on `main` before it: 316 / 316. `scripts/run_gpu_tests.py` on `main`: 207 pass / 49 skip / 0 fail, and with `LEONIDA_W64_EMULATE=1` 239 / 17 / 0. AI-assisted: yes.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!396
No description provided.