GPU: a list that binds a heap's view-address table keeps it until reset #2329

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

@⁠denkencar-sketch on GitHub · 2026-11-25 10:42 UTC · original
denkencar-sketch:fix/dhost-003 → main · +47 −4 · 3 files · 1 commits · open

Summary

The view-address table a list binds lived and died with its heap, which the title may release while the GPU still reads the table as a root view. A list that binds it now keeps it until reset. It is also made under the made-slots lock now, so a view noted meanwhile is not lost.

Testing

Test a_list_keeps_the_view_address_table_it_binds fails without the keep and passes with this change. The second part, holding the lock across the publish, is not covered by a test (it is right by reading).

cargo test --workspace --locked passes apart from known flakes: modules::dstorage::tests::a_page_list_filled_after_its_request_starts fails now and then on main too, and so does a parallel-run flake in victory-gpu's lib tests (watch:: and descriptor::host:: tests, 2 of 40 runs on pristine main).

This changes the same function as open PR #1906, so a small textual conflict is expected. Not tried: a run in the game.

AI-assisted.

**@⁠denkencar-sketch** on GitHub · 2026-11-25 10:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/2329) `denkencar-sketch:fix/dhost-003` → `main` · +47 −4 · 3 files · 1 commits · open ## Summary The view-address table a list binds lived and died with its heap, which the title may release while the GPU still reads the table as a root view. A list that binds it now keeps it until reset. It is also made under the made-slots lock now, so a view noted meanwhile is not lost. ## Testing Test `a_list_keeps_the_view_address_table_it_binds` fails without the keep and passes with this change. The second part, holding the lock across the publish, is not covered by a test (it is right by reading). `cargo test --workspace --locked` passes apart from known flakes: `modules::dstorage::tests::a_page_list_filled_after_its_request_starts` fails now and then on `main` too, and so does a parallel-run flake in `victory-gpu`'s lib tests (`watch::` and `descriptor::host::` tests, 2 of 40 runs on pristine `main`). This changes the same function as open PR #1906, so a small textual conflict is expected. Not tried: a run in the game. AI-assisted.
The table lived and died with the heap, which the title may release while
the GPU still reads it as a root view. It is also made under the made-slots
lock now, so a view noted meanwhile is not lost.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:28 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 15:22 UTC · original · edited 2026-11-26 03:25 UTC

Automated triage for the maintainers.

Verdict: merge candidate (as before the conflict). Thanks for rebasing; it merges cleanly into current main.

crates/victory-gpu/src/draw.rs: the root SRV bound for view addresses now goes through kept_view_addresses, which list.keeps the table's ID3D12Resource. On main a list keeps the descriptor heaps it binds (draw.rs around line 1027) but not this upload buffer, which HostHeap owns. So a heap the title releases before the list runs could free a buffer the GPU still reads. descriptor/host.rs view_addresses now takes the made lock before get_or_init and holds it until the table is published. mirror notes addresses while holding that lock, so an address noted between the snapshot and the publish is no longer lost.

Outside this PR: dynamic slots (make_at, make_raw) call note_address without the made lock, and their entries aren't in the snapshot. That is the same as on main.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 15:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/2329#issuecomment-7166755200) · edited 2026-11-26 03:25 UTC <!-- victory-triage v1 head=0c80172b507e0ea27610641417fe78c03d219ae1 verdict=merge-candidate at=2026-11-26T03:25:41Z --> Automated triage for the maintainers. **Verdict: merge candidate** (as before the conflict). Thanks for rebasing; it merges cleanly into current `main`. `crates/victory-gpu/src/draw.rs`: the root SRV bound for view addresses now goes through `kept_view_addresses`, which `list.keep`s the table's `ID3D12Resource`. On `main` a list keeps the descriptor heaps it binds (`draw.rs` around line 1027) but not this upload buffer, which `HostHeap` owns. So a heap the title releases before the list runs could free a buffer the GPU still reads. `descriptor/host.rs` `view_addresses` now takes the `made` lock before `get_or_init` and holds it until the table is published. `mirror` notes addresses while holding that lock, so an address noted between the snapshot and the publish is no longer lost. Outside this PR: dynamic slots (`make_at`, `make_raw`) call `note_address` without the `made` lock, and their entries aren't in the snapshot. That is the same as on `main`. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/2329/head:github-bot/gh-2329'
git switch 'github-bot/gh-2329'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2329'
git switch 'github-bot/gh-2329'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2329'
git switch 'github-bot/gh-2329'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2329'
git switch 'main'
git merge --squash 'github-bot/gh-2329'
git switch 'main'
git merge --ff-only 'github-bot/gh-2329'
git switch 'main'
git merge 'github-bot/gh-2329'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2329
No description provided.