GPU: remap out-of-range descriptor tables on capped host view heaps #33
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/33"
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?
Imported from Marvisak/VIctory. Originally posted by Yaekai on 2026-11-23T23:28:05Z.
Fixes 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.Imported from Marvisak/VIctory. Originally posted by Sunkiller-qc on 2026-11-23T23:46:46Z.
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.Imported from Marvisak/VIctory. Originally posted by Yaekai on 2026-11-23T23:59:34Z.
Closing as superseded by merged #21.
Pull request closed