Skip to content

[Review import] GPU/shader: clamp null buffer views in capped descriptor heaps (upstream #2177) - #11

Draft
maok625 wants to merge 6 commits into
mainfrom
review/upstream-pr-2177-capped-descriptor-heaps
Draft

maok625 wants to merge 6 commits into
mainfrom
review/upstream-pr-2177-capped-descriptor-heaps

Conversation

@maok625

@maok625 maok625 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Imported from Marvisak#2177 for review on this fork.

Upstream source head: 0497f58408a446e7d86566a141e39d6a7da63237 (from n-romanovich/VIctory). Its original merge base is f3578e386ea0f06153445af10a698df029620aad, three commits behind current main. This import is intentionally preserved as a draft and needs a rebase/conflict review before it is considered merge-ready.

Interaction warning: overlaps Marvisak#3300 in descriptor/host.rs and overlaps Marvisak#2885 in descriptor/shader lowering. Review as a descriptor-heap stack; do not merge independently without reconciling the allocator and shader heap bounds.

Draft import only. Inspect all touched code and tests, resolve interactions with sibling review branches, and run Windows/D3D12 tests before merging. No local build or GPU validation has been performed by this import.

BLOCKER — allocator boundary case to fix before merge

The upstream discussion reports a concrete layout bug in the current head: on a 1,000,000-slot host heap, the ordinary DYNAMIC allocation branch does not reserve CAPPED_PAIRS + 3 slots for memory SRV/UAV pairs and the top null/clamp descriptors. Requests around 713,278–737,856 can leave pair space shrinking to zero; at 737,854–737,856 the null slots can be overlapped or not installed, and a memory view pair can be assigned a null/clamp slot. The proposed fix is to include the pair and top-slot reserve in that branch's requested capacity (the reporter tested count.saturating_add(DYNAMIC + CAPPED_PAIRS + 3).max(views)) and add boundary regression tests. Also reconcile the competing allocator policy in Marvisak#3300 and the raw structured-buffer shader changes in Marvisak#2885/Marvisak#2178; do not merge this PR untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants