GPU: dynamic descriptor slots go back only to the heap that took them #3611
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!3611
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3611"
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?
@Ingenioeren on GitHub · 2026-11-27 21:03 UTC · original
Ingenioeren:fix/3606-dynamic-heap-identity→main· +104 −22 · 3 files · 1 commits · openWhat
Give each host descriptor heap a monotonic identity (
NEXT_ID). Record it with every dynamic range held byState, and return slots only when the receiving host heap has that identity. Update root views, unordered-access clears, fresh tables, and releases through the runtime's own view heap.Add
draw::tests::old_state_reset_does_not_free_a_replacement_heaps_dynamic_slots. It holds a slot from heap A in an old State, unregisters and destroys A, installs heap B at exactly the same title-heap address, and gives B's same slot to a new State. Resetting the old State must leave B's slot occupied; resetting B's State must return it. The test uses the existing host-device and descriptor-heap helpers, with deterministic address reuse.Why
An address identifies a location, but a new heap can occupy that location after the old one is destroyed. A stale State previously freed the replacement heap's live slots on reset/drop, allowing two live lists to share dynamic slots and overwrite one another's descriptors.
Ported from fxceless/victory-fork@52ac4ec (cccw), fork PR #1324. Source: GPL-3.0-or-later fork commit 52ac4ec0f8a03f103c146e60228e53612759d435, fork PR #1324. Adapted to current main with a State-level address-reuse regression.
How tested
All commands ran locally on Windows 11 with an AMD Radeon RX 6750 XT (RDNA2, native AMD D3D12 driver), without game files.
origin/maincode at63bcca4and rancargo test --locked --offline -p victory-gpu: 231 passed, 1 failed, 1 ignored. The new regression was the only failure: after the old State reset, allocation returnedSome(4)instead ofNone, proving that B's occupied slot had been freed. No pre-existing test failures were observed.cargo test --locked --offline -p victory-gpu: 232 passed, 0 failed, 1 ignored; doc tests: 0 passed, 0 failed. The same regression passed. The existing ignored test is the synthetic private-data release benchmark.cargo clippy --locked --offline -p victory-gpu --all-targets -- -D warnings: passed.cargo fmt --check: failed on pre-existing formatting differences. Repeated the same command in an untouched archive of63bcca4: both runs report 925 formatting hunks across 66 files. The formatting changes requested are identical; one hunk's surrounding context reflects the updated release signature. No new formatting failures were introduced, and no formatting checks were disabled.git add -- crates/victory-gpu/src/descriptor.rs crates/victory-gpu/src/descriptor/host.rs crates/victory-gpu/src/draw.rs, then rancargo run --locked --offline -p xtask -- policy --staged: passed,asset policy: 3 files ok.git diff --check: passed.Not tested
No game run or game files were used. In-game reachability and rendering behavior were not tested. The D3D12 host-backed regression ran and failed before the fix, then passed after it; it did not take the no-device early return.
Fixes #3606
AI assistance: prepared with OpenAI Codex under Claude Code's direction, reviewed by Ingenioeren.
@oni-swr on GitHub · 2026-11-27 22:03 UTC · original
Independent verification of
26b63a03eacf1e4921daeb071a8e5f7119fb6cd1againstmainat63bcca43c6a00a758510398fa43096ce7e4f7df0. Clean merge. Native Windows x64, D3D12 WARP only, with both WARP switches set, SDKdxil.dll, andvictory-gpudiagnostics enabled. Tests (passed / failed / ignored) were 246 / 0 / 1 on base and 247 / 0 / 1 on head. The backported regression freed the replacement heap’s occupied slot on base and passed on head. Clippy passed with all targets, all features, and-D warnings. Command-list releases check the allocating heap’s identity, and page-table pairs return to their owning heap. Review found no slot leaks or blocking defects.AI-assisted (Codex, gpt-6.2-sol).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.