GPU: remap out-of-range descriptor tables on capped host view heaps #33
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!33
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/33/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?
@Yaekai on GitHub · 2026-11-23 23:28 UTC · original
Yaekai:fix/capped-heap-table-remap→main· +32 −1 · 2 files · 1 commits · closed without mergingFixes a
DXGI_ERROR_DEVICE_HUNGon GPUs whose shader-visible CBV/SRV/UAV heap is capped at 1,000,000 descriptors (e.g. NVIDIA).Cause
HostHeap::newcapsself.countat934,464(1,000,000 - 65,536) and places dynamic scratch slots in[934,464..1,000,000).934,464(around962,055–962,570), landing inside the dynamic scratch range.State::tablesonly remapped tables containing aCbv, so any shader stage whose table had only SRVs/UAVs (such as the legal/loading UI pixel shaders) was skipped bymirror()(index >= self.count) and sampled a random descriptor from the dynamic scratch region, hanging the GPU.Fix
HostHeap::is_sampler()andHostHeap::in_range(index).HostHeap::in_range(index)into dynamic slots inState::tables, alongside CBV tables.Verification
cargo test -p victory-gpu: 36/36 passed.DXGI_ERROR_DEVICE_HUNG), now renders cleanly past the intro and legal screens with no D3D12 errors on those draws.@Sunkiller-qc on GitHub · 2026-11-23 23:46 UTC · original
Thanks for tracking this down. The same fix landed in #21 (merged as
3827767):State::tablesnow remaps any table entry at or pasthost.count(). Your branch still merges into main, but the result runs both checks back to back (draw.rs:630here anddraw.rs:632from #21). Theis_sampler()guard doesn't change anything there, since only view heaps get capped inHostHeap::new. Unless I'm missing a case #21 doesn't cover, this one could probably be closed. Static review, not built or run.@Yaekai on GitHub · 2026-11-23 23:59 UTC · original
Closing as superseded by merged #21.
Pull request closed