[PR #1987] [MERGED] d3d12, test: track unbound T# refusal counts by reason and verify binding rules (RT-UNBOUND-TSHARP-REASONS) #1994

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1987
Author: @abnalstlll-byte
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142

Base: main ← Head: feat/rt-unbound-tsharp-reasons


📝 Commits (2)

  • 5e188a0 d3d12, test: track unbound T# refusal counts by reason and verify binding rules (RT-UNBOUND-TSHARP-REASONS)
  • a05c178 d3d12, test: fix unbound_tsharp_tracker scope and verify binding rules (RT-UNBOUND-TSHARP-REASONS)

📊 Changes

4 files changed (+545 additions, -21 deletions)

View changed files

📝 runtime/CMakeLists.txt (+8 -0)
📝 runtime/shims/d3d12_com.h (+34 -0)
📝 runtime/shims/d3d12_vulkan_device.cpp (+109 -21)
➕ runtime/test/d3d12_unbound_tsharp_rules_test.cpp (+394 -0)

📄 Description

Summary

Implements per-reason refusal tracking for console descriptor heap T# binding and provides synthetic unit tests verifying binding rules as requested on the maintainer roadmap.

Item claimed in #1608: RT-UNBOUND-TSHARP-REASONS.

Key Changes

  1. runtime/shims/d3d12_vulkan_device.cpp:
    • note_refused_tsharp: tracks both total distinct slots and per-reason distinct slots and total refusal counts (UnboundTsharpTracker). Logs per-reason distinct slot count when logging a refusal.
    • ConsoleHeap: tracks refused_reasons and logs periodic summary in refresh_console_heaps (console descriptor heap 0x... unbound T#s by reason: ...) mirroring title textures diagnostic reporting.
    • bind_title_image: sets refusal reason "no texture at T# address" when !owner instead of leaving why unassigned.
    • Exposes unbound_tsharp_stats(), reset_unbound_tsharp_stats(), note_refused_tsharp_for_test(), test_bind_title_image(), and resource_image_address().
  2. runtime/shims/d3d12_com.h:
    • Declares UnboundTsharpStats, UnboundTsharpReasonStats, and inspection helpers.
    • Declares enum class TitleImage.
  3. runtime/test/d3d12_unbound_tsharp_rules_test.cpp:
    • Synthetic test covering:
      • 1D rule: dimension and layer count compatibility ("T# type or samples do not fit the texture").
      • Array rule: layer bounds ("T# names layers the texture lacks").
      • Cube rule: minimum layer requirements ("cube T# on fewer than six layers").
      • MSAA rule: sample count matching ("T# type or samples do not fit the texture").
      • Per-reason tracking: distinct slot and total refusal counts by reason.
  4. runtime/CMakeLists.txt:
    • Registers d3d12_unbound_tsharp_rules_test.

Clean-Room & Verification

  • python -I scripts/check_no_game_data.py: passed (0 game data).
  • python -I tests/test_docs_links.py: passed (16/16).
  • python -I tests/test_docs_design_rows.py: passed (5/5).
  • python -I tests/test_text_write_line_endings.py: passed (3/3).
  • python -m compileall -q make_game.py tools tests: passed.

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/1987 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/25/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `feat/rt-unbound-tsharp-reasons` --- ### 📝 Commits (2) - [`5e188a0`](https://github.com/ubiquitarianism/leonida/commit/5e188a02f96933e27001016f0abd8fa126a7e665) d3d12, test: track unbound T# refusal counts by reason and verify binding rules (RT-UNBOUND-TSHARP-REASONS) - [`a05c178`](https://github.com/ubiquitarianism/leonida/commit/a05c17870816824ce754783658f66da0f3e1252a) d3d12, test: fix unbound_tsharp_tracker scope and verify binding rules (RT-UNBOUND-TSHARP-REASONS) ### 📊 Changes **4 files changed** (+545 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+8 -0) 📝 `runtime/shims/d3d12_com.h` (+34 -0) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+109 -21) ➕ `runtime/test/d3d12_unbound_tsharp_rules_test.cpp` (+394 -0) </details> ### 📄 Description ### Summary Implements per-reason refusal tracking for console descriptor heap T# binding and provides synthetic unit tests verifying binding rules as requested on the maintainer roadmap. Item claimed in #1608: `RT-UNBOUND-TSHARP-REASONS`. ### Key Changes 1. **`runtime/shims/d3d12_vulkan_device.cpp`**: - `note_refused_tsharp`: tracks both total distinct slots and per-reason distinct slots and total refusal counts (`UnboundTsharpTracker`). Logs per-reason distinct slot count when logging a refusal. - `ConsoleHeap`: tracks `refused_reasons` and logs periodic summary in `refresh_console_heaps` (`console descriptor heap 0x... unbound T#s by reason: ...`) mirroring title textures diagnostic reporting. - `bind_title_image`: sets refusal reason `"no texture at T# address"` when `!owner` instead of leaving `why` unassigned. - Exposes `unbound_tsharp_stats()`, `reset_unbound_tsharp_stats()`, `note_refused_tsharp_for_test()`, `test_bind_title_image()`, and `resource_image_address()`. 2. **`runtime/shims/d3d12_com.h`**: - Declares `UnboundTsharpStats`, `UnboundTsharpReasonStats`, and inspection helpers. - Declares `enum class TitleImage`. 3. **`runtime/test/d3d12_unbound_tsharp_rules_test.cpp`**: - Synthetic test covering: - 1D rule: dimension and layer count compatibility (`"T# type or samples do not fit the texture"`). - Array rule: layer bounds (`"T# names layers the texture lacks"`). - Cube rule: minimum layer requirements (`"cube T# on fewer than six layers"`). - MSAA rule: sample count matching (`"T# type or samples do not fit the texture"`). - Per-reason tracking: distinct slot and total refusal counts by reason. 4. **`runtime/CMakeLists.txt`**: - Registers `d3d12_unbound_tsharp_rules_test`. ### Clean-Room & Verification - `python -I scripts/check_no_game_data.py`: passed (0 game data). - `python -I tests/test_docs_links.py`: passed (16/16). - `python -I tests/test_docs_design_rows.py`: passed (5/5). - `python -I tests/test_text_write_line_endings.py`: passed (3/3). - `python -m compileall -q make_game.py tools tests`: passed. AI-assisted (Claude Code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:19:40 +01:00
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#1994
No description provided.