runtime: add unit test suite for console command list IID mapping (RT-XS-COMMAND-LIST-IID-COVERAGE) #2039

Open
github-bot wants to merge 1 commit from github-bot/gh-2039 into main AGit
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-25 18:45 UTC · original
abnalstlll-byte:feat/rt-xs-command-list-iid-coverage → main · +114 −0 · 2 files · 1 commits · open

Claimed in the coordination issue as: RT-XS-COMMAND-LIST-IID-COVERAGE (claim)

What and why

runtime/shims/d3d12_xs_command_list_iid.h provides mapping for console command-list interface IDs passed to device slot 73 (CreateCommandListX). The console passes a specific GUID whose PC counterpart is ID3D12GraphicsCommandList6 (sharing identical first 32 bits Data1). Unmapped console IIDs fail on the PC device with E_NOINTERFACE.

Previously, d3d12_xs_command_list_iid.h had no dedicated unit test.

This adds runtime/test/d3d12_xs_command_list_iid_test.cpp verifying:

  1. kCommandListIidPairs & command_list_iid_for_pc:
    • Maps measured console command list IID c3827890-4024-474c-98cf-645b51dc4874 to PC ID3D12GraphicsCommandList6 (c3827890-e548-4cfa-96cf-5689a9370f80), verifying identical Data1 and setting mapped == true.
    • Safely handles mapped == nullptr.
  2. is_pc_command_list_iid:
    • Validates that standard PC command list interfaces (ID3D12CommandList, ID3D12GraphicsCommandList, and 1 through 7) are recognized as PC IIDs.
    • Rejects non-command list interfaces (IUnknown, ID3D12Device, ID3D12Resource) and console IIDs.
  3. Pass-through of unmodified PC IIDs and unknown random IIDs (mapped == false).

Registers d3d12_xs_command_list_iid_test and CTest in runtime/CMakeLists.txt.

Tested

  • Unit test execution: 24/24 checks passed (0 failures).
  • python -I tests/test_ci_registration.py: 16/16 pass.
  • python -I tests/test_text_write_line_endings.py: 3/3 pass.
  • python -I scripts/check_no_game_data.py: clean (0 violations, no game data).

AI-assisted (Claude Code)

**@⁠abnalstlll-byte** on GitHub · 2026-11-25 18:45 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2039) `abnalstlll-byte:feat/rt-xs-command-list-iid-coverage` → `main` · +114 −0 · 2 files · 1 commits · open Claimed in the coordination issue as: RT-XS-COMMAND-LIST-IID-COVERAGE ([claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608)) ### What and why `runtime/shims/d3d12_xs_command_list_iid.h` provides mapping for console command-list interface IDs passed to device slot 73 (`CreateCommandListX`). The console passes a specific GUID whose PC counterpart is `ID3D12GraphicsCommandList6` (sharing identical first 32 bits `Data1`). Unmapped console IIDs fail on the PC device with `E_NOINTERFACE`. Previously, `d3d12_xs_command_list_iid.h` had no dedicated unit test. This adds `runtime/test/d3d12_xs_command_list_iid_test.cpp` verifying: 1. `kCommandListIidPairs` & `command_list_iid_for_pc`: - Maps measured console command list IID `c3827890-4024-474c-98cf-645b51dc4874` to PC `ID3D12GraphicsCommandList6` (`c3827890-e548-4cfa-96cf-5689a9370f80`), verifying identical `Data1` and setting `mapped == true`. - Safely handles `mapped == nullptr`. 2. `is_pc_command_list_iid`: - Validates that standard PC command list interfaces (`ID3D12CommandList`, `ID3D12GraphicsCommandList`, and 1 through 7) are recognized as PC IIDs. - Rejects non-command list interfaces (`IUnknown`, `ID3D12Device`, `ID3D12Resource`) and console IIDs. 3. Pass-through of unmodified PC IIDs and unknown random IIDs (`mapped == false`). Registers `d3d12_xs_command_list_iid_test` and CTest in `runtime/CMakeLists.txt`. ### Tested - Unit test execution: `24/24 checks passed` (0 failures). - `python -I tests/test_ci_registration.py`: 16/16 pass. - `python -I tests/test_text_write_line_endings.py`: 3/3 pass. - `python -I scripts/check_no_game_data.py`: clean (0 violations, no game data). AI-assisted (Claude Code)
Add standalone CPU-only unit test runtime/test/d3d12_xs_command_list_iid_test.cpp covering console command list IID mapping to PC ID3D12GraphicsCommandList6, classification of PC command list IIDs (is_pc_command_list_iid), and pass-through of PC and unknown IIDs.

Register d3d12_xs_command_list_iid_test executable and CTest in runtime/CMakeLists.txt.

AI-assisted (Claude Code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:15:47 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2039/head:github-bot/gh-2039'
git switch 'github-bot/gh-2039'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2039'
git switch 'github-bot/gh-2039'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2039'
git switch 'github-bot/gh-2039'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2039'
git switch 'main'
git merge --squash 'github-bot/gh-2039'
git switch 'main'
git merge --ff-only 'github-bot/gh-2039'
git switch 'main'
git merge 'github-bot/gh-2039'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.