d3d12x: add compute list fixture #1176

Merged
lambirou merged 1 commit from upstream-pr/1183 into main 2026-11-24 03:35:06 +00:00
lambirou commented 2026-11-24 02:54:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T02:54:23Z.


Change

Add a compute command-list fixture that covers behavior beyond XCL-09's single table dispatch.

  • The source-built compute list transitions upload, UAV target and readback buffers, issues a
    clear, records two dispatches with different group counts, copies the target to readback and
    compares 320 words against a CPU reference.
  • The fixture audits four resource transitions and one UAV barrier; the positive readback has
    zero mismatches and hash 0x0afb0285.
  • Negative controls prove a missing dispatch leaves 192 expected mismatches starting at word 64,
    while four wrong-state cases are rejected with named operation/state pairs.
  • No public D3D12Xbox...CommandList export was found in the public material consulted, so no
    production export is added. The fixture uses the desktop command-list interface through the
    XCL-08 device and existing XCL-09 descriptor helpers.

Verification

  • cmake --build --preset dev --target d3d12_xs_shim d3d12x_compute_list_check
    • Passed with MSVC 19.44.
  • ctest --preset dev --no-tests=error -R '^d3d12x_compute_' -V
    • 2/2 passed.
    • WARP: Microsoft Basic Render Driver, 1414/008c, driver 10.0.26100.10068; transitions 4,
      UAV barriers 1, positive mismatches 0.
    • Hardware: AMD Radeon RX 9060 XT, 1002/7590, driver 32.0.32029.2010; same counts and hash.
    • Windows 10.0.26300; debug layer unavailable.
    • Negative: omitted second dispatch gives 192 mismatches starting at word 64; four
      wrong-state operations (Dispatch, upload copy, target copy, readback copy) are all
      rejected with named states.
  • docs_links_check.py: Self-test passed., Checked 15 Markdown files and 266 links..
  • git diff --check origin/main...HEAD: clean.
  • Not run: full CTest, release preset and console hardware.

Evidence and follow-up

  • Branch d3d12x/compute-lists, head e28b607, based on 4b740f9c (contains XCL-08/09).
  • The test uses the source-built compute shader and descriptor heaps already exercised by
    XCL-09, but adds explicit transitions, clear, copy, two dispatches, an ordered readback and
    wrong-state controls.
  • Boundary: this is the desktop command-list path on the D3D12.X device, not a claimed console
    command-list ABI. No src/ change is included.
  • docs/experiments.md records the exact CTests and the wrong-state/omitted-dispatch controls;
    the capability matrix row is updated.
  • Provenance: public Microsoft D3D12 command-list/barrier/copy docs, Windows SDK d3d12.h and
    the local XCL-08/09 evidence. No XCL code, table or output.
  • No game files, dumps, shader bytes, title paths or secrets.

Checklist

  • One reviewable behavior: compute list barriers, clear, copies and two dispatches.
  • Positive byte-exact readback and wrong-state/omitted-dispatch controls.
  • Documentation and capability matrix updated.
  • No game files, dumps, logs or secrets.
  • Provenance checked; no XCL code used.
  • AI-assisted (Codex).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6573552801 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1183). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-24T02:54:23Z. --- ## Change Add a compute command-list fixture that covers behavior beyond XCL-09's single table dispatch. - The source-built compute list transitions upload, UAV target and readback buffers, issues a clear, records two dispatches with different group counts, copies the target to readback and compares 320 words against a CPU reference. - The fixture audits four resource transitions and one UAV barrier; the positive readback has zero mismatches and hash `0x0afb0285`. - Negative controls prove a missing dispatch leaves 192 expected mismatches starting at word 64, while four wrong-state cases are rejected with named operation/state pairs. - No public `D3D12Xbox...CommandList` export was found in the public material consulted, so no production export is added. The fixture uses the desktop command-list interface through the XCL-08 device and existing XCL-09 descriptor helpers. ## Verification - `cmake --build --preset dev --target d3d12_xs_shim d3d12x_compute_list_check` - Passed with MSVC 19.44. - `ctest --preset dev --no-tests=error -R '^d3d12x_compute_' -V` - 2/2 passed. - WARP: Microsoft Basic Render Driver, 1414/008c, driver 10.0.26100.10068; transitions 4, UAV barriers 1, positive mismatches 0. - Hardware: AMD Radeon RX 9060 XT, 1002/7590, driver 32.0.32029.2010; same counts and hash. - Windows 10.0.26300; debug layer unavailable. - Negative: omitted second dispatch gives 192 mismatches starting at word 64; four wrong-state operations (`Dispatch`, upload copy, target copy, readback copy) are all rejected with named states. - `docs_links_check.py`: `Self-test passed.`, `Checked 15 Markdown files and 266 links.`. - `git diff --check origin/main...HEAD`: clean. - Not run: full CTest, release preset and console hardware. ## Evidence and follow-up - Branch `d3d12x/compute-lists`, head `e28b607`, based on `4b740f9c` (contains XCL-08/09). - The test uses the source-built compute shader and descriptor heaps already exercised by XCL-09, but adds explicit transitions, clear, copy, two dispatches, an ordered readback and wrong-state controls. - Boundary: this is the desktop command-list path on the D3D12.X device, not a claimed console command-list ABI. No `src/` change is included. - `docs/experiments.md` records the exact CTests and the wrong-state/omitted-dispatch controls; the capability matrix row is updated. - Provenance: public Microsoft D3D12 command-list/barrier/copy docs, Windows SDK `d3d12.h` and the local XCL-08/09 evidence. No XCL code, table or output. - No game files, dumps, shader bytes, title paths or secrets. ## Checklist - [x] One reviewable behavior: compute list barriers, clear, copies and two dispatches. - [x] Positive byte-exact readback and wrong-state/omitted-dispatch controls. - [x] Documentation and capability matrix updated. - [x] No game files, dumps, logs or secrets. - [x] Provenance checked; no XCL code used. - [x] AI-assisted (Codex).
upstream-sync closed this pull request 2026-11-24 06:46:45 +00:00
tedin7 commented 2026-11-24 06:46:45 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Technical review on Linux (Windows build and D3D12/WARP/hardware tests were not executed locally).

Checks run (Linux, commit e28b6077)

  • python3 -B tests/docs_links_check.py: passed (Checked 15 Markdown files and 266 links.).
  • python3 -B tests/bidi_controls_check.py: passed (Checked 968 tracked source, script and build/CI files: no bidirectional controls.).
  • python3 -B tests/gpu_report_format_check.py: Ran 10 tests in 0.004s — OK.
  • python3 -B tests/hardware_reports_check.py: Ran 11 tests in 0.026s — OK.
  • python3 tests/rdna2_tools_check.py: Ran 111 tests ... — OK (skipped=11) (without LLVM_LIB).

Audit

  • AGENTS.md / documentation: Title-neutral throughout; docs/experiments.md (XCL-10) and docs/xcl-capability-matrix.md are updated with exact commands, environment details, and boundaries.
  • C++/D3D12 (tests/d3d12x_compute_list_check.cpp):
    • load_shim frees the HMODULE on error paths and after device.Reset() in main; ComPtr manages D3D12 interfaces without leaks.
    • Map/Unmap D3D12_RANGE arguments match upload/readback directions; ClearUnorderedAccessViewUint pairs the bound shader-visible GPU handle with the non-visible staging CPU handle; static_asserts enforce the 64 + 192 + 64 = 320 word partition.
    • Negative controls cover an omitted second dispatch (192 mismatches starting at word 64, prefix and clear tail preserved) and 4 named wrong-state checks in StateAudit (explicitly documented as fixture policy rather than runtime debug-layer enforcement).

No blocking issues found in static inspection.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6033053646 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1183#pullrequestreview-6033053646). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T03:03:55Z. **Review:** COMMENTED --- Technical review on Linux (Windows build and D3D12/WARP/hardware tests were **not** executed locally). ### Checks run (Linux, commit `e28b6077`) - `python3 -B tests/docs_links_check.py`: passed (`Checked 15 Markdown files and 266 links.`). - `python3 -B tests/bidi_controls_check.py`: passed (`Checked 968 tracked source, script and build/CI files: no bidirectional controls.`). - `python3 -B tests/gpu_report_format_check.py`: `Ran 10 tests in 0.004s — OK`. - `python3 -B tests/hardware_reports_check.py`: `Ran 11 tests in 0.026s — OK`. - `python3 tests/rdna2_tools_check.py`: `Ran 111 tests ... — OK (skipped=11)` (without `LLVM_LIB`). ### Audit - **AGENTS.md / documentation**: Title-neutral throughout; `docs/experiments.md` (XCL-10) and `docs/xcl-capability-matrix.md` are updated with exact commands, environment details, and boundaries. - **C++/D3D12 (`tests/d3d12x_compute_list_check.cpp`)**: - `load_shim` frees the `HMODULE` on error paths and after `device.Reset()` in `main`; `ComPtr` manages D3D12 interfaces without leaks. - `Map`/`Unmap` `D3D12_RANGE` arguments match upload/readback directions; `ClearUnorderedAccessViewUint` pairs the bound shader-visible GPU handle with the non-visible staging CPU handle; `static_assert`s enforce the 64 + 192 + 64 = 320 word partition. - Negative controls cover an omitted second dispatch (192 mismatches starting at word 64, prefix and clear tail preserved) and 4 named wrong-state checks in `StateAudit` (explicitly documented as fixture policy rather than runtime debug-layer enforcement). No blocking issues found in static inspection.
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!1176
No description provided.