d3d12, test: track unbound T# refusal counts by reason and verify binding rules (RT-UNBOUND-TSHARP-REASONS) #1987
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1987
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1987/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@abnalstlll-byte on GitHub · 2026-11-25 17:27 UTC · original
abnalstlll-byte:feat/rt-unbound-tsharp-reasons→main· +545 −21 · 4 files · 2 commits · merged 2026-11-25 21:12 UTCSummary
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
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: tracksrefused_reasonsand logs periodic summary inrefresh_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!ownerinstead of leavingwhyunassigned.unbound_tsharp_stats(),reset_unbound_tsharp_stats(),note_refused_tsharp_for_test(),test_bind_title_image(), andresource_image_address().runtime/shims/d3d12_com.h:UnboundTsharpStats,UnboundTsharpReasonStats, and inspection helpers.enum class TitleImage.runtime/test/d3d12_unbound_tsharp_rules_test.cpp:"T# type or samples do not fit the texture")."T# names layers the texture lacks")."cube T# on fewer than six layers")."T# type or samples do not fit the texture").runtime/CMakeLists.txt: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)
In runtime/shims/d3d12_vulkan_device.cpp, extend note_refused_tsharp to record both overall distinct slots and per-reason distinct slots and total refusal counts across console descriptor heaps, matching the title texture diagnostic breakdown in refresh_console_heaps. Expose inspection helpers in runtime/shims/d3d12_com.h and add synthetic tests in runtime/test/d3d12_unbound_tsharp_rules_test.cpp 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") - Tracking: distinct slot and total refusal counts by reason AI-assisted (Claude Code)@aslan2142 on GitHub · 2026-11-25 19:22 UTC · original
Thanks. At
2c77fe878the runtime doesn't build (clang-cl):unbound_tsharp_tracker()is a static member ofDeviceState, but the new test helpers call it at namespace scope.bind_title_imagecall there matches no declaration.rt::d3d12_xs::resource_proxy_real_resourcedoesn't exist.Please build
gta6rt_d3d12_combefore pushing.AI-assisted (Claude Code, Claude Opus 5.5).
@abnalstlll-byte on GitHub · 2026-11-25 20:58 UTC · original
Fixed the reported build issues and verified with a clean local build of
gta6rt_d3d12_comand the test suite:UnboundTsharpTrackerandunbound_tsharp_tracker()to namespace scope so the test helper functions can access the tracker directly.Device::state()overload sotest_bind_title_imagecan pass a mutableDeviceState&tobind_title_image.resource_proxy_real_resource()call;resource_image_address()now castsID3D12Resource*directly viaResource::from<Resource>.bind_title_imageto check texture layers (layers >= 6) before the layer overflow check, and updated test Case 3b to request 6 faces on a 4-layer texture.D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGETto the test's MSAA texture descriptor.Built
gta6rt_d3d12_com.libandd3d12_unbound_tsharp_rules_test.exewith MSVC 19.51 / Windows SDK 10.0.26100.All 35 checks in
d3d12_unbound_tsharp_rules_testpass cleanly (0 failures).AI-assisted (Claude Code)