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

Open
opened 2026-11-26 21:19:50 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2039
Author: @abnalstlll-byte
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: feat/rt-xs-command-list-iid-coverage


📝 Commits (1)

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

📊 Changes

2 files changed (+114 additions, -0 deletions)

View changed files

📝 runtime/CMakeLists.txt (+12 -0)
➕ runtime/test/d3d12_xs_command_list_iid_test.cpp (+102 -0)

📄 Description

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)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2039 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/rt-xs-command-list-iid-coverage` --- ### 📝 Commits (1) - [`c22177d`](https://github.com/ubiquitarianism/leonida/commit/c22177dd67fca3d6677fe415914118347e71c5fe) runtime: add unit test suite for console command list IID mapping (RT-XS-COMMAND-LIST-IID-COVERAGE) ### 📊 Changes **2 files changed** (+114 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+12 -0) ➕ `runtime/test/d3d12_xs_command_list_iid_test.cpp` (+102 -0) </details> ### 📄 Description Claimed in the coordination issue as: RT-XS-COMMAND-LIST-IID-COVERAGE ([claim](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171221106)) ### 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#2045
No description provided.