Repository navigation
Conversation
On NVIDIA hardware, shader-visible CBV/SRV/UAV heaps fail creation past PORTABLE_VIEWS (1,000,000). Previously, HostHeap::new skipped count + DYNAMIC whenever (count + DYNAMIC).max(HEAP_VIEWS) failed, and capped large heaps down to MIN_DYNAMIC (65,536) dynamic slots. Because 2^16 dynamic slots can exhaust in seconds in the world (Marvisak#59) and high-index tables also spill into dynamic slots on capped heaps, draws can be dropped or trigger device removal. Furthermore, heavy scene churn benchmarks (Marvisak#747) demonstrated that 2^17 (131,072) dynamic slots still exhaust (refusing 944 tables a frame). - Extract allocate_view_heap() to try count + DYNAMIC before capping. - On capped heaps (PORTABLE_VIEWS = 1,000,000), prioritize reserving the full DYNAMIC (2^18 = 262,144) pool, leaving 737,856 title slots (PORTABLE_VIEWS - DYNAMIC). In hardware gameplay benchmarks (RTX 5070 Ti, fxceless/victory-fork), this split resulted in 0 dynamic tables refused across 3 runs of 210 s (~275k tables requested). - Probe HEAP_VIEWS support in dynamic_slots_are_held_until_released so capped NVIDIA GPUs assert >= 4 + DYNAMIC instead of panicking on the 2M Tier-3 check. - Add unit test view_heap_allocation_scales_on_capped_hosts covering Tier 3, NVIDIA capped layouts, and fallback behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Imported from Marvisak#3300 for review on this fork.
Upstream source head:
01f91fea96de7c6fe47d5dd9f302e51a2403cac7(fromAdvaitPalve11/VIctory). This commit is directly based on the current fork baseline63bcca43c6a00a758510398fa43096ce7e4f7df0; no commits from main need to be replayed.This is a draft review import only. Please inspect the implementation and tests, resolve any interactions with other review branches, and run the Windows/D3D12 test suite before merging. No local build or hardware validation has been performed by this import.
Integration / merge warning
This allocator implementation overlaps upstream Marvisak#2177 in the same file,
crates/victory-gpu/src/descriptor/host.rs. Marvisak#2177 also adds the shader-side host heap limit, null-view placement, and a reserved pair area. This PR is allocator-only; do not merge it independently as the complete NVIDIA capped-heap fix. Compare both allocation policies and build one combined implementation with regression tests for title slots, dynamic slots, null SRV/UAV slots, and memory view pairs. Marvisak#2177 currently has a reported layout boundary bug that also needs correction.