slot 70: structured buffer views at an address that is not a whole number of elements into the 64 KiB page are refused (buffer_unavailable) #2839
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#2839
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@tedin7 on GitHub · 2026-11-26 12:50 UTC · original
Part of #870
Problem
Device slot 70 publishes a buffer memory SRV by address. When no placed resource covers the address,
unplaced_memory_bufferinsrc/startup_stubs/d3d12_memory_srv.inlbacks the view with the surrounding 64 KiB page (existing-heap wrap or an upload copy), and the wrapper's base is the page start.resolve_buffer_srv_desc(src/startup_stubs/memory_srv_buffer.h) then needs(address - base) % element_bytes == 0to express the address as a FirstElement. For a structured view (StructureByteStride 12, 180, 320, 2048, ...) at a sub-allocated address that is usually false, so the call ends inbuffer_unavailableand the destination descriptor keeps its old content.Expected
A structured or typed buffer view at any readable address inside memory the title owns publishes, and a shader reads element 0 from that address.
Proposed fix
When the page-start base cannot name the address (
unplaced_view_needs_exact_start), back the view with an upload copy that starts at the view address (span = the view span), kept in separate cache entries, no existing-heap wrap. The page-coverage and nearby-owner checks still run on the page.Verification
startup_memory_srv_buffer_check(new shapes;--mutate exact-startmust fail), registered in the CMake mutant list.startup_address_buffer_srvdraw test: an unplaced structured view (stride 12, page offset 0x104) is read through slot 70; without the fix the column keeps the previous descriptor's value.@tedin7 on GitHub · 2026-11-26 12:50 UTC · original
Taking this one; a Draft PR will follow.