Repository navigation
Conversation
…eap::drop - Add `memory::forget_heap(&HostHeap)` and invoke it from `Heap::drop()` in `descriptor.rs` (after releasing `SHADER_HEAPS`) whenever the dropped title view heap materialized a `HostHeap`. - Prevents a newly allocated `Heap` reusing the freed `Box<Heap>` address from hitting a stale `(base, made)` entry in `MEMORY.heaps`, which skipped reserving dynamic slots and could corrupt title descriptors or write OOB when the new heap's size differed. - Add synthetic D3D12 unit test `dropping_a_view_heap_evicts_its_memory_heaps_entry`.
triippywhale
added a commit
to triippywhale/victory-fork
that referenced
this pull request
Nov 25, 2026
- memory.rs (fxceless#589's test): ready() here takes the builder flag too. - draw.rs (310c6eb): sort_unstable_by_key with Reverse, as clippy asks. - indirect.rs (310c6eb's bare_command_cost bench): the stored depth_written handle is never read; allowed with a reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017V7WBA8CxPD68KngjiMeJb
PiloteCode
added a commit
to PiloteCode/victory-fork
that referenced
this pull request
Nov 25, 2026
…celess#24/fxceless#104), null CBVs (fxceless#304), tables at list cuts (fxceless#742), heap entries (fxceless#589), barriers (fxceless#787), depth-stencil UAV barriers (fxceless#214), windows ending at recorded writes (fxceless#663), sRGB views (fxceless#644), wide accesses across pages (fxceless#846), view-guard costs (fxceless#812/fxceless#853), the fill latch (fxceless#860), pipeline waits (fxceless#709), robustness; opt-in fxceless#868/fxceless#845
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.
Problem
In
crates/victory-gpu/src/memory.rs,MEMORY.heapscaches(base, made)descriptor-run state keyed by rawHostHeappointer (std::ptr::from_ref(heap) as usize), whereHostHeapis stored inline insideHeap::host: OnceLock<Option<HostHeap>>.When a title releases a shader-visible view
Heap,Heap::drop()(crates/victory-gpu/src/descriptor.rs) removed it fromSHADER_HEAPSbut never removed itsHostHeapaddress fromMEMORY.heaps. If a newly createdHeapreused the freed address:MEMORY.heaps.get(&key)hit the stale(base, made)entry, skippingheap.dynamic(COPIES + 1)and leaving the null UAV and copies0..madeunwritten on the new heap.count,basecould land inside the title's own descriptor slots or past the end of the host descriptor heap.Fix
memory::forget_heap(heap: &HostHeap)incrates/victory-gpu/src/memory.rsand call it fromHeap::drop()incrates/victory-gpu/src/descriptor.rsafter dropping theSHADER_HEAPSlock.dropping_a_view_heap_evicts_its_memory_heaps_entry.Verification
cargo test -p victory-gpu --locked memory::tests -- --test-threads=1: 1 passed, 0 failedcargo test -p victory-gpu --locked descriptor -- --test-threads=1: 15 passed, 0 failedcargo xtask policy: 169 files okcargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings: clean (default-features build onc96b4f2has only the pre-existingdead_codewarning onplaced_filler_twins, tracked in GPU: keep clippy green without the diagnostics feature #491)(AI-assisted; synthetic unit tests only, no game data.)