startup: name the command list slots the noop log can state #1781

Merged
tedin7 merged 2 commits from upstream-pr/1788 into main 2026-11-24 19:08:37 +00:00
tedin7 commented 2026-11-24 18:42:55 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T18:42:55Z.


Refs #870.

Change

The x2w-noop line of a command list slot now names the slot where the name is known: CommandList::slot14(Dispatch) instead of CommandList::slot14. The form slotN(Name) follows the existing Device::slot10(CreateGraphicsPipelineState) lines, and tools/startup/triage_run.py reads the slot number with slot(\d+)\b, so the triage grouping is unchanged.

  • New header src/startup_stubs/command_list_slot_names.h: plain C++, no Windows types.
  • Hook in d3d12_xs_device.cpp: one include and four lines in noop_slot, only for the command list kind. No function behaviour changes; only the logged name does.
  • Test tests/startup_command_list_slot_names.cpp, registered after the startup_draw_bmp controls in CMakeLists.txt.

What is named, and what is not

Slots Name Why
0 to 9 IUnknown, object, GetDevice (7), GetType (8), Close (9) desktop order; 7 and 9 are implemented
10, 11 none desktop has Reset and ClearState here, but this list resets through 139
12 to 25 DrawInstanced to SetPipelineState desktop order; 12, 13, 20 to 23 and 25 are implemented, so 14 to 19 and 24 sit between matching ends with the right count
26 to 31 none four console methods sit here: slot 32 is SetDescriptorHeaps, which is desktop 28
32 to 59 desktop 28 to 55 plus four implemented and matching: 32, 34, 36, 40, 42, 44, 47, 48, 50, 52
139 Reset implemented in d3d12_xs_device.cpp
everything else, 60 and up none the console list has methods of its own there; a name would be a guess

Every named slot in 0..9, 12..25, and 32..59 (desktop + 4) was cross-checked against the public Windows SDK d3d12.h ID3D12GraphicsCommandListVtbl (53 named slots total, 0 mismatches).

Test and results

Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at 4e47decc

  • Debug (--preset dev):
    • cmake --build --preset dev --target d3d12_xs_shim startup_command_list_slot_names d3d12x_graphics_list_check -- -j 8: built d3d12_xs.dll (d3d12_xs_device.cpp) and tests (20.10s).
    • ctest --preset dev -R "^(startup_command_list_slot_names|d3d12x_graphics_list_warp)$" --parallel 6 --no-tests=error --output-on-failure: 2/2 passed (startup_command_list_slot_names 0.02s, d3d12x_graphics_list_warp 0.05s).
  • Release /O2 (--preset release):
    • cmake --build --preset release --target d3d12_xs_shim startup_command_list_slot_names d3d12x_graphics_list_check -- -j 8: built d3d12_xs.dll and tests (38.14s).
    • ctest --preset release -R "^(startup_command_list_slot_names|d3d12x_graphics_list_warp)$" --parallel 6 --no-tests=error --output-on-failure: 2/2 passed (startup_command_list_slot_names 0.02s, d3d12x_graphics_list_warp 0.05s).
  • Production mutations on Windows (command_list_slot_names.h, --preset dev):
    • console_shift changed 4 -> 3: startup_command_list_slot_names FAILED (39 check(s) failed, expected).
    • last_shifted_slot changed 59 -> 63: startup_command_list_slot_names FAILED (4 check(s) failed, expected).

Linux (local)

  • g++ -std=c++17 -O2 -Wall -Wextra -fsanitize=address,undefined -fno-sanitize-recover=undefined: no warnings, command list slot name checks passed.
  • tests/docs_links_check.py and tests/bidi_controls_check.py pass; git diff --check origin/main...HEAD is clean.

Not run

  • No run with a title: whether the x2w-noop log at slots 10, 11, 26 to 31 or 60+ corresponds to specific methods stays unknown and intentionally unnamed.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6588911963 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1788). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T18:42:55Z. --- Refs #870. ## Change The `x2w-noop` line of a command list slot now names the slot where the name is known: `CommandList::slot14(Dispatch)` instead of `CommandList::slot14`. The form `slotN(Name)` follows the existing `Device::slot10(CreateGraphicsPipelineState)` lines, and `tools/startup/triage_run.py` reads the slot number with `slot(\d+)\b`, so the triage grouping is unchanged. - New header `src/startup_stubs/command_list_slot_names.h`: plain C++, no Windows types. - Hook in `d3d12_xs_device.cpp`: one include and four lines in `noop_slot`, only for the command list kind. No function behaviour changes; only the logged name does. - Test `tests/startup_command_list_slot_names.cpp`, registered after the `startup_draw_bmp` controls in `CMakeLists.txt`. ## What is named, and what is not | Slots | Name | Why | |---|---|---| | 0 to 9 | IUnknown, object, GetDevice (7), GetType (8), Close (9) | desktop order; 7 and 9 are implemented | | 10, 11 | none | desktop has Reset and ClearState here, but this list resets through 139 | | 12 to 25 | DrawInstanced to SetPipelineState | desktop order; 12, 13, 20 to 23 and 25 are implemented, so 14 to 19 and 24 sit between matching ends with the right count | | 26 to 31 | none | four console methods sit here: slot 32 is SetDescriptorHeaps, which is desktop 28 | | 32 to 59 | desktop 28 to 55 plus four | implemented and matching: 32, 34, 36, 40, 42, 44, 47, 48, 50, 52 | | 139 | Reset | implemented in `d3d12_xs_device.cpp` | | everything else, 60 and up | none | the console list has methods of its own there; a name would be a guess | Every named slot in `0..9`, `12..25`, and `32..59` (`desktop + 4`) was cross-checked against the public Windows SDK `d3d12.h` `ID3D12GraphicsCommandListVtbl` (53 named slots total, 0 mismatches). ## Test and results ### Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at `4e47decc` - **Debug (`--preset dev`)**: - `cmake --build --preset dev --target d3d12_xs_shim startup_command_list_slot_names d3d12x_graphics_list_check -- -j 8`: built `d3d12_xs.dll` (`d3d12_xs_device.cpp`) and tests (`20.10s`). - `ctest --preset dev -R "^(startup_command_list_slot_names|d3d12x_graphics_list_warp)$" --parallel 6 --no-tests=error --output-on-failure`: **2/2 passed** (`startup_command_list_slot_names` `0.02s`, `d3d12x_graphics_list_warp` `0.05s`). - **Release `/O2` (`--preset release`)**: - `cmake --build --preset release --target d3d12_xs_shim startup_command_list_slot_names d3d12x_graphics_list_check -- -j 8`: built `d3d12_xs.dll` and tests (`38.14s`). - `ctest --preset release -R "^(startup_command_list_slot_names|d3d12x_graphics_list_warp)$" --parallel 6 --no-tests=error --output-on-failure`: **2/2 passed** (`startup_command_list_slot_names` `0.02s`, `d3d12x_graphics_list_warp` `0.05s`). - **Production mutations on Windows (`command_list_slot_names.h`, `--preset dev`)**: - `console_shift` changed `4 -> 3`: `startup_command_list_slot_names` **FAILED** (`39 check(s) failed`, expected). - `last_shifted_slot` changed `59 -> 63`: `startup_command_list_slot_names` **FAILED** (`4 check(s) failed`, expected). ### Linux (local) - `g++ -std=c++17 -O2 -Wall -Wextra -fsanitize=address,undefined -fno-sanitize-recover=undefined`: no warnings, `command list slot name checks passed`. - `tests/docs_links_check.py` and `tests/bidi_controls_check.py` pass; `git diff --check origin/main...HEAD` is clean. ## Not run - No run with a title: whether the `x2w-noop` log at slots 10, 11, 26 to 31 or 60+ corresponds to specific methods stays unknown and intentionally unnamed. AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-24 19:01:43 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T18:56:00Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T18:58:29.077799Z 4e47dec Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7141355109 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1788#issuecomment-7141355109). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T18:56:00Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"4e47decccacc33aef2c75a9e8239a5f7c8750f1b","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T18:58:29.077799Z">2026-11-24T18:58:29.077799Z</relative-time> | `4e47dec` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
upstream-sync closed this pull request 2026-11-24 20:00:36 +00:00
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
R0Y00/Xbox2Windows!1781
No description provided.