docs, tests: record descriptor heap census and provide 32-bit address translation contract suite (BL-4) #1166
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!1166
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1166/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-24 19:30 UTC · original
abnalstlll-byte:feat/bl4-descriptor-address-translation→main· +419 −7 · 3 files · 2 commits · merged 2026-11-25 23:31 UTCResolves the open finding in
docs/boot_leads.md §BL-4("descriptor words are 32-bit GPU addresses"):1. Descriptor Heap Census & Findings (
docs/boot_leads.md,docs/d3d12_vulkan.md§3.4)value = slot_index + 1, ending at0xFFFFFFFF)2. Synthetic Contract Test Suite (
tests/test_descriptor_address_translation.py)docs/d3d12_vulkan.md§3.3/§3.4):host_address = heap_base + console_va): Verifies lossless translation andptr32_lotruncation compatibility for the 25,865 shaders zeroing the high dword before addition.word0andword1[15:0].address >> 8acrossword0andword1[7:0]) with 256-byte alignment.IMAGE_KEY_BASE(4 GiB) starts strictly aboveARENA_CAP_MAX(4095 MiB).XboxBvhBuilder.dllvalidation (addr < 2^40and 256-byte aligned).Verification
pytest tests/test_descriptor_address_translation.py: 53/53 PASSED (0.19s).python -I scripts/check_no_game_data.py: 0 violations (100% clean-room).@KernelSmoker on GitHub · 2026-11-24 19:40 UTC · original · review (dismissed)
Reviewed exact head 3cfdd0d6c6d8e979c313936b3c311030c0818b52. Static scope check:
tests/test_descriptor_address_translation.pytests helpers defined in that same file (encode_vsharp_base,decode_vsharp_base, etc.) and arithmetic written inline; it does not import/call the productiongfx10::encode/decode,rdna2spirv.py, or runtime arena-address path. For example, the ptr32 tests compare two expressions built from the same Python arithmetic. Those checks may serve as an executable model, but they do not verify that the current implementation conforms or guard against implementation drift. The original BL-4 test description called for a synthetic heap round-tripped through the translation. Please either connect the suite to the production encoding/translation path, or label it explicitly as model-only and adjust the documentation so “verified by the contract suite” does not imply production behavior was exercised.I could not independently run pytest: it is absent on the host and in the available project tools image.
py_compilepassed, andcheck_no_game_data.pypassed on the three changed files. The missing pytest dependency is an environment limitation, not a test failure.@Deedlyy on GitHub · 2026-11-24 20:11 UTC · original
Recommendation: [WAIT]
Reasoning: Records a descriptor-heap census in the BL-4 docs and adds a 380-line "32-bit address translation contract suite". As KernelSmoker pointed out, the suite only exercises helpers defined in the test file itself; it never calls the production
gfx10encode/decode,rdna2spirv.pyor the runtime arena path, so it can't catch implementation drift. The docs nonetheless say the behaviour is "verified by the contract suite". Either wire the tests to the production code, or label them model-only and soften the documentation. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict withmain.Impact level: 3/10
@abnalstlll-byte on GitHub · 2026-11-25 11:01 UTC · original
Thank you for the review @Deedlyy. Updated in commit 32a3995b: clarified the documentation in \docs/d3d12_vulkan.md\ and \docs/boot_leads.md, and marked \ ests/test_descriptor_address_translation.py\ explicitly as a model-level reference contract specification exercising documented bitfield partitioning and address extraction contracts prior to runtime C++ integration. All 53 tests continue to pass.
@abnalstlll-byte on GitHub · 2026-11-25 21:47 UTC · original
Updated in commit
da6013559:untime/src/gfx10_descriptors.h\ and translation paths in \ ools/rdna2spirv.py\ conform to the documented 48-bit V#/T# packing and masking rules.
AI-assisted (Claude Code, Claude Opus 5.5).