victory-gpu: key dynamic descriptor slot releases by heap id #549

Open
github-bot wants to merge 1 commit from github-bot/gh-549 into a-publier AGit
Owner

@⁠SalmanBarkat on GitHub · 2026-11-27 11:08 UTC · original
SalmanBarkat:fix/heap-id-dynamic-slots → a-publier · +126 −45 · 5 files · 1 commits · open

Summary

  • Assign each Heap a monotonic id: u64 (NEXT_HEAP_ID) and track it in SHADER_HEAPS (ShaderHeap) instead of identifying shader heaps solely by guest ptr.
  • Key dynamic slot tracking (State::dynamic, root_srv_slots, root_uav_slots), with_heap / release_dynamic / constant_slot, and deferred constant slot targets (defer_constants, FillTo::Slot, To::Slot) by heap.id so a stale reference after a heap is dropped cannot release or overwrite dynamic slots on a new heap created at the same guest address.
  • Add stale_heap_id_cannot_release_or_touch_newer_heap_at_same_pointer regression test in crates/victory-gpu/src/descriptor.rs.

Verification

  • cargo clippy --workspace --all-targets --locked -- -D warnings (passed)
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings (passed)
  • cargo test --locked -p victory-gpu --lib -- --test-threads=1 (397 passed, 0 failed, 34 ignored)
  • cargo test --locked -p victory-gpu --all-features --lib -- --test-threads=1 (446 passed, 0 failed, 34 ignored)
  • cargo test -p xtask --locked (9 passed, 0 failed)
**@⁠SalmanBarkat** on GitHub · 2026-11-27 11:08 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/549) `SalmanBarkat:fix/heap-id-dynamic-slots` → `a-publier` · +126 −45 · 5 files · 1 commits · open ## Summary - Assign each `Heap` a monotonic `id: u64` (`NEXT_HEAP_ID`) and track it in `SHADER_HEAPS` (`ShaderHeap`) instead of identifying shader heaps solely by guest `ptr`. - Key dynamic slot tracking (`State::dynamic`, `root_srv_slots`, `root_uav_slots`), `with_heap` / `release_dynamic` / `constant_slot`, and deferred constant slot targets (`defer_constants`, `FillTo::Slot`, `To::Slot`) by `heap.id` so a stale reference after a heap is dropped cannot release or overwrite dynamic slots on a new heap created at the same guest address. - Add `stale_heap_id_cannot_release_or_touch_newer_heap_at_same_pointer` regression test in `crates/victory-gpu/src/descriptor.rs`. ## Verification - `cargo clippy --workspace --all-targets --locked -- -D warnings` (passed) - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` (passed) - `cargo test --locked -p victory-gpu --lib -- --test-threads=1` (397 passed, 0 failed, 34 ignored) - `cargo test --locked -p victory-gpu --all-features --lib -- --test-threads=1` (446 passed, 0 failed, 34 ignored) - `cargo test -p xtask --locked` (9 passed, 0 failed)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 11:13:54 +00:00
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-27 15:56 UTC · original

Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At bcc90ce: victory-gpu 397 passed, 0 failed, 34 ignored.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-27 15:56 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/549#issuecomment-7222669324) Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At `bcc90ce`: `victory-gpu` 397 passed, 0 failed, 34 ignored. AI-assisted (Claude Code); no game data.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/549/head:github-bot/gh-549'
git switch 'github-bot/gh-549'

Merge

Merge the changes and update on Forgejo.
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-549'
git switch 'github-bot/gh-549'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-549'
git switch 'github-bot/gh-549'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-549'
git switch 'a-publier'
git merge --squash 'github-bot/gh-549'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-549'
git switch 'a-publier'
git merge 'github-bot/gh-549'
git push origin 'a-publier'
This discussion has been locked. Commenting is limited to contributors.
No description provided.