GPU: release directly indexed buffer ranges with their heap #67

Open
github-bot wants to merge 1 commit from github-bot/gh-67 into main AGit
Owner

@⁠ryotdev on GitHub · 2026-11-24 21:06 UTC · original
ryotdev:codex/heap-owned-buffer-ranges → main · +98 −52 · 2 files · 1 commits · open

State::heap_buffers stored each heap's directly indexed buffer ranges in a process-wide map keyed by its address. Releasing the heap left the map holding its shadow buffers. A heap allocated at that address could also inherit the previous heap's pass count and stale slot ranges.

The host descriptor heap now owns its slot ranges and pass count alongside its buffer-view writes. Its first pass visits every buffer slot. Subsequent passes visit written slots, with the existing full rescan every 16 passes. Other owners, including in-flight lists, keep their own resource references.

Verification

  • Built the victory-gpu Windows x64 test binary with Rust 1.98.1. The new CPU-only lifetime regression and six neighboring descriptor tests passed on Windows.
  • The regression observes the last strong reference through a weak reference, replaces the tracking state at the same address, and checks the replacement heap's first pass. The same fixture failed on the lifetime assertion in a standalone negative control using the old process-wide address-keyed ownership.
  • A synthetic single-heap run with 81,920 slots, 64 writes per pass and 128 passes visited 663,040 slots, with eight full scans and matching range checksums under both ownership models.
  • All-targets, all-features Clippy for victory-gpu passed with warnings denied. The repository's asset policy passed.

AI-assisted. Validation used synthetic inputs.

**@⁠ryotdev** on GitHub · 2026-11-24 21:06 UTC · [original](https://github.com/fxceless/victory-fork/pull/67) `ryotdev:codex/heap-owned-buffer-ranges` → `main` · +98 −52 · 2 files · 1 commits · open `State::heap_buffers` stored each heap's directly indexed buffer ranges in a process-wide map keyed by its address. Releasing the heap left the map holding its shadow buffers. A heap allocated at that address could also inherit the previous heap's pass count and stale slot ranges. The host descriptor heap now owns its slot ranges and pass count alongside its buffer-view writes. Its first pass visits every buffer slot. Subsequent passes visit written slots, with the existing full rescan every 16 passes. Other owners, including in-flight lists, keep their own resource references. ### Verification - Built the `victory-gpu` Windows x64 test binary with Rust 1.98.1. The new CPU-only lifetime regression and six neighboring descriptor tests passed on Windows. - The regression observes the last strong reference through a weak reference, replaces the tracking state at the same address, and checks the replacement heap's first pass. The same fixture failed on the lifetime assertion in a standalone negative control using the old process-wide address-keyed ownership. - A synthetic single-heap run with 81,920 slots, 64 writes per pass and 128 passes visited 663,040 slots, with eight full scans and matching range checksums under both ownership models. - All-targets, all-features Clippy for `victory-gpu` passed with warnings denied. The repository's asset policy passed. AI-assisted. Validation used synthetic inputs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:33 +00:00
Author
Owner

@⁠adriaespii on GitHub · 2026-11-24 21:14 UTC · original

Independent test run on commit 8a761ec (AMD RDNA4):

  • Hardware: AMD Radeon RX 9070 (driver 32.0.32015.7029), AMD Ryzen 5 7600, Windows 11 Pro, Rust 1.98.1 (x86_64-pc-windows-msvc)
  • cargo clippy --workspace --all-targets -- -D warnings: 0 warnings
  • cargo test --workspace: 497 passed, 0 failed, 7 ignored (victory-gpu: 111 passed, 0 failed, 1 ignored; victory-shader: 210 passed, 0 failed, 2 ignored)
  • Not tested: live game run (no game files on this machine)

AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.

**@⁠adriaespii** on GitHub · 2026-11-24 21:14 UTC · [original](https://github.com/fxceless/victory-fork/pull/67#issuecomment-7144666676) Independent test run on commit `8a761ec` (AMD RDNA4): - **Hardware:** AMD Radeon RX 9070 (driver 32.0.32015.7029), AMD Ryzen 5 7600, Windows 11 Pro, Rust 1.98.1 (`x86_64-pc-windows-msvc`) - `cargo clippy --workspace --all-targets -- -D warnings`: 0 warnings - `cargo test --workspace`: 497 passed, 0 failed, 7 ignored (`victory-gpu`: 111 passed, 0 failed, 1 ignored; `victory-shader`: 210 passed, 0 failed, 2 ignored) - **Not tested:** live game run (no game files on this machine) *AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.*
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/descriptor/host.rs
  • crates/victory-gpu/src/draw.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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