vkback: the one-mutable-binding descriptor-heap probe; learning (issue #57) #80
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/vktory6--VKtory!80
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-80"
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?
@NotBalkanus on GitHub · 2026-12-01 11:58 UTC · original
NotBalkanus:descriptor-heap-probe→main· +903 −0 · 4 files · 2 commits · merged 2026-12-01 12:12 UTCWhat
An evidence pull request for the direction decision on #57 ("Descriptor heap as one array"), as asked (comment #57). It commits to no direction:
greenfield/vkback/src/bin/vk-mutprobe.rs— a self-contained offline probe of the one-VK_DESCRIPTOR_TYPE_MUTABLE_EXT-binding descriptor heap. It builds its own device (mutable feature enabled), makes one-binding candidate layouts beside today'slayout::make, allocates the real full-size buffer, and dispatches a test shader (assembled withspirv-asfrom the SPIR-V text in the file) that reads and writes one slot through every access kind. Catalogued indocs/tools.md(rule 21).docs/learnings/descriptor-heap-array.md— the findings, indexed in the learnings README.No other code changes: the translator and the write path are untouched, and the two-family backend half I had locally is kept out of this PR, in my branch, until the decision.
What the probe answered (reference card: RX 9070 XT / RADV GFX1201, Mesa 26.3.1)
The two facts the decision needs beyond the pipeline-level aliasing proof in the task:
s_load_b256atbinding_offset + index * 32) and running on those bytes — no per-type sub-offsets — andvkGetDescriptorEXTforMUTABLE_EXTdoes not compose a slot (a 6-byte header only).Under
VK_LAYER_KHRONOS_validationthe whole usage (six shader variables sharing one mutable binding, the dispatches, the writes and nulls) reports no VUIDs on RADV.Verification
cargo run -p vkback --bin vk-mutprobe, seconds; needsspirv-ason PATH;--asm <file>writes the test shader's ACO assembly), output above from the reference card.cargo build -p vkback,cargo test -p vkback(150 lib tests + policy 6/6),cargo clippy -p vkbackclean for the added file (the 233 warningscargo clippy --workspaceshows on this branch are pre-existing on main: the same count on a pristineorigin/maincheckout, none in the touched files).Notes
@vktory6 on GitHub · 2026-12-01 12:16 UTC · original
Merged, thanks! It commits to no direction, as intended: the probe and the learning are now in the tree for the decision on #57.
Before it ran anywhere, I read what it executes (temporary SPIR-V files,
spirv-as, an optional--asmoutput; the faulting cross-family case isn't run). I pushed one commit (6e09d40):// SAFETY:comments on its twounsafeblocks and the two mapped slices, which the new rule 36 asks for. The reasoning holds becauseDev::one_shotwaits for the queue before results are read. The check and clippy pass on main.