d3d12, test: track unbound T# refusal counts by reason and verify binding rules (RT-UNBOUND-TSHARP-REASONS) #1987
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1987"
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?
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T17:27:51Z.
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
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)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T19:22:09Z.
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).
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T20:58:40Z.
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)