d3d12x: add device creation slots #1059

Merged
lambirou merged 2 commits from upstream-pr/1066 into main 2026-11-24 00:46:12 +00:00
lambirou commented 2026-11-24 00:06:40 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-24T00:06:40Z.


Change

Add the D3D12.X device-slot inventory and cover the existing D3D12XboxCreateDevice creation
path.

  • src/d3d12x_device_slots.h/.cpp hold an ordered constexpr table of creation IIDs and
    observed vtable slots, with kind, index, GUID, name, state and evidence.
  • D3D12XboxCreateDevice consults the table for IID_ID3D12Device. A null output remains
    E_POINTER; a non-null parameter block remains E_INVALIDARG; an unknown IID returns
    E_NOINTERFACE, clears the output and prints
    D3D12XboxCreateDevice: unsupported IID {7c0e1a10-5f2d-4b7a-9a51-3d9c6b2e8f01}.
  • Device1, Device3 and the observed vtable slots 14, 28 and 76 are recorded as
    documented/observed but not implemented. They are an inventory, not a claimed console ABI.
  • tests/d3d12x_device_check.cpp loads the built DLL by explicit path and checks the
    D3D12XboxCreateDevice export ownership.

This PR does not accept the public D3D12XBOX_CREATE_DEVICE_PARAMETERS block or
IID_ID3D12Device1; that is a follow-up question.

Verification

  • cmake --build --preset dev --target d3d12_xs_shim d3d12x_device_check
    • Passed with MSVC 19.44.
  • ctest --preset dev --no-tests=error -R '^d3d12x_device_' -V
    • 4/4 passed:
      • WARP create: Microsoft Basic Render Driver, vendor 1414, device 008c, driver
        10.0.26100.10068; S_OK, one node, fence S_OK, output non-null.
      • WARP negative: E_POINTER for a null output, exact unknown-IID line, E_NOINTERFACE,
        output null.
      • Hardware create: AMD Radeon RX 9060 XT, vendor 1002, device 7590, driver
        32.0.32029.2010; same checks.
      • Hardware negative: same named refusal.
    • Windows 10.0.26300; debug layer unavailable in both runs.
  • Existing d3d12_xs_shim_*, vm_translation_sequence_warp and
    vm_translation_sequence_hardware still pass.
  • docs_links_check.py: Self-test passed., Checked 15 Markdown files and 237 links..
  • git diff --check origin/main...HEAD: clean.
  • Not run: the full CTest suite, the release preset and Windows CI for this branch.

Evidence and follow-up

  • Branch d3d12x/device-slots, head 040d496, based on 9c3ab31 (which includes XCL-04).
    Commit 8b97622 adds the device slots; 040d496 updates the existing shadow-rejection trace
    to expect the new named IID line.
  • Evidence sources: the Windows SDK d3d12.h, the public Xbox-GDK-Samples
    DeviceResources.cpp for Device1, and the local docs/experiments.md anchors for the
    observed slots. No XCL code, table or output is copied.
  • Follow-up: decide whether to accept D3D12XBOX_CREATE_DEVICE_PARAMETERS and
    IID_ID3D12Device1; do not treat the observed vtable index 76 as a production interface from
    one call site.
  • docs/experiments.md records the CTest names and the slot inventory boundary.
  • No game files, dumps, shader bytes, title paths or secrets are included.

Checklist

  • One reviewable behavior: device creation through the existing D3D12.X entry.
  • Positive WARP/hardware and negative unknown-IID controls.
  • Public source evidence and a named limitation.
  • No game files, dumps, logs or secrets.
  • Provenance checked; no XCL code used.
  • AI-assisted (Codex).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6571506688 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1066). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-24T00:06:40Z. --- ## Change Add the D3D12.X device-slot inventory and cover the existing `D3D12XboxCreateDevice` creation path. - `src/d3d12x_device_slots.h/.cpp` hold an ordered `constexpr` table of creation IIDs and observed vtable slots, with kind, index, GUID, name, state and evidence. - `D3D12XboxCreateDevice` consults the table for `IID_ID3D12Device`. A null output remains `E_POINTER`; a non-null parameter block remains `E_INVALIDARG`; an unknown IID returns `E_NOINTERFACE`, clears the output and prints `D3D12XboxCreateDevice: unsupported IID {7c0e1a10-5f2d-4b7a-9a51-3d9c6b2e8f01}`. - Device1, Device3 and the observed vtable slots 14, 28 and 76 are recorded as documented/observed but not implemented. They are an inventory, not a claimed console ABI. - `tests/d3d12x_device_check.cpp` loads the built DLL by explicit path and checks the `D3D12XboxCreateDevice` export ownership. This PR does not accept the public `D3D12XBOX_CREATE_DEVICE_PARAMETERS` block or `IID_ID3D12Device1`; that is a follow-up question. ## Verification - `cmake --build --preset dev --target d3d12_xs_shim d3d12x_device_check` - Passed with MSVC 19.44. - `ctest --preset dev --no-tests=error -R '^d3d12x_device_' -V` - 4/4 passed: - WARP create: Microsoft Basic Render Driver, vendor 1414, device 008c, driver 10.0.26100.10068; `S_OK`, one node, fence `S_OK`, output non-null. - WARP negative: `E_POINTER` for a null output, exact unknown-IID line, `E_NOINTERFACE`, output null. - Hardware create: AMD Radeon RX 9060 XT, vendor 1002, device 7590, driver 32.0.32029.2010; same checks. - Hardware negative: same named refusal. - Windows 10.0.26300; debug layer unavailable in both runs. - Existing `d3d12_xs_shim_*`, `vm_translation_sequence_warp` and `vm_translation_sequence_hardware` still pass. - `docs_links_check.py`: `Self-test passed.`, `Checked 15 Markdown files and 237 links.`. - `git diff --check origin/main...HEAD`: clean. - Not run: the full CTest suite, the release preset and Windows CI for this branch. ## Evidence and follow-up - Branch `d3d12x/device-slots`, head `040d496`, based on `9c3ab31` (which includes XCL-04). Commit `8b97622` adds the device slots; `040d496` updates the existing shadow-rejection trace to expect the new named IID line. - Evidence sources: the Windows SDK `d3d12.h`, the public Xbox-GDK-Samples `DeviceResources.cpp` for Device1, and the local `docs/experiments.md` anchors for the observed slots. No XCL code, table or output is copied. - Follow-up: decide whether to accept `D3D12XBOX_CREATE_DEVICE_PARAMETERS` and `IID_ID3D12Device1`; do not treat the observed vtable index 76 as a production interface from one call site. - `docs/experiments.md` records the CTest names and the slot inventory boundary. - No game files, dumps, shader bytes, title paths or secrets are included. ## Checklist - [x] One reviewable behavior: device creation through the existing D3D12.X entry. - [x] Positive WARP/hardware and negative unknown-IID controls. - [x] Public source evidence and a named limitation. - [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:06 +00:00
R0Y00 commented 2026-11-24 06:49:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T00:25:32Z.


The new unsupported-IID diagnostic changed the existing shadow fixture's exact stderr trace. I updated the rejection control to expect the precise IID before the existing release and cleanup messages. The fixture still verifies exit status, empty frame payload, ordered events and cleanup for native, pe_map and AOT. Windows Release passed all four device tests and both shadow tests on RTX 4060 Laptop and WARP.
Candidate: 040d496361

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7118054562 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1066#issuecomment-7118054562). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T00:25:32Z. --- The new unsupported-IID diagnostic changed the existing shadow fixture's exact stderr trace. I updated the rejection control to expect the precise IID before the existing release and cleanup messages. The fixture still verifies exit status, empty frame payload, ordered events and cleanup for native, pe_map and AOT. Windows Release passed all four device tests and both shadow tests on RTX 4060 Laptop and WARP. Candidate: 040d496361a61a0979cf263b8cafad8329d5fd12
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!1059
No description provided.