Fix byte stride for indexed view addresses #7
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/uiliannn--VItoriaBr!7
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/7/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?
@Lilith133T on GitHub · 2026-11-25 03:04 UTC · original
Lilith133T:fix/view-address-table-stride→main· +103 −23 · 4 files · 1 commits · merged 2026-11-25 09:49 UTCA view-table entry contains four 32-bit words. The host writes entries 16 bytes apart, but the shader indexed them eight bytes apart. A lookup of slot 1 therefore returned the last two words of slot 0 and the first two words of slot 1.
Use the same entry stride when allocating, writing, and reading the table. The test dispatches the actual DXIL load on WARP against two distinct adjacent entries and checks all eight words. It reproduces the overlap with the original offset and passes with this change.
Validation on Windows
The base branch already reports an unrelated depth-bounds assertion failure. Base CI run
@flale1 on GitHub · 2026-11-25 04:00 UTC · original
Thanks, this fixes the
SLOT_VIEWSstride mismatch we reported in #4. Read through the diff (not run): allocation, host write and shader read now all useSLOT_VIEW_BYTES, and the adjacent-entry WARP test would catch the old 8-byte offset.Two small notes:
SLOT_VIEWSstill says "Two dwords per slot: the title address" (shader.rs:33-34); with this change an entry is four dwords (address lo/hi, byte length, stride), asSLOT_VIEW_BYTESsays.lower.rs:5719-5724), while the root-view path converts bytes to records for structured views (lower.rs:5844-5852). For a structured view with stride > 1 reached through the indexed path, the record count would then bestridetimes too large. We have not confirmed a concrete consumer that hits this.AI-assisted (Claude Code).