Files
reims-vgpu/crates
Anees IqbalandClaude f02f3aec2c 🐛 The binding mask read zero for a module that declares six, because this device relocates a fragment stage past 255
`crates/reims-vgpu`, `runtime/gpu_hang_trail.rs` and its producer. Measurement
only.

The masks added one commit ago were `u32`, on the stated premise that "buffers
sit below 32, sampled images at 32+ and samplers at 64+". Those are m2v's own
bands. This device *relocates* on top of them whenever both stages carry buffers
or sampled resources — `FRAG_BUFFER_BINDING_OFFSET` is 256 and
`FRAG_SAMPLED_RESOURCE_BINDING_OFFSET` is 288 — and the running module is the
relocated variant, not the one in the translated pool an offline walk reads.

So the first boot read `fdecl=0x0` on every draw of the 95 212-word shader the
field was built to look at, and `fprov=0x3f` — six bindings, all of them the
*vertex* stage's, which are the only ones that stayed under 32. A field that
reads zero because its representation cannot hold the answer is worse than no
field: it reads as "nothing declared", which is exactly the reassuring direction.

Replaced with counts plus the lowest four gap binding numbers. Not a wider mask:
the numbers reach past 320, a mask that held them would be four words an entry,
and the interesting answer is *which* binding rather than the set. `frag_gap`
says when the four are a truncation. The mistake is recorded on `GAP_KEPT` rather
than only here, because it is the one a future reader of this field is most
likely to repeat.

# Verified

`the_gap_is_declared_minus_provided_and_names_its_lowest_members` covers the
direction (provided-but-not-declared is not a gap, since a layout may legally
carry a descriptor the module never mentions) and the truncation. Full `--lib`
suite on the Vulkan arm: 1925 passed, 0 failed. Clippy `-D warnings` clean on
`backend-vulkan,host-window` and `backend-metal`.

Not verified: no boot has read the corrected field.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-12 10:35:50 +03:00
..