Repository navigation
GPU: a list that binds a heap's view-address table keeps it until reset - #2329
Open
denkencar-sketch wants to merge 1 commit into
Open
denkencar-sketch wants to merge 1 commit into
denkencar-sketch wants to merge 1 commit into
Conversation
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.
catminou4
reviewed
Nov 25, 2026
catminou4
left a comment
Contributor
There was a problem hiding this comment.
A list binding a heap's view-address table keeps it until published — lock ordering documented. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
DenRakEiw
approved these changes
Nov 25, 2026
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:
- Retaining the bound view-address table on the command list until reset cleanly prevents use-after-free when a heap's table is replaced while commands are still in flight.
cargo test -p victory-gpu draw::tests: 6/6 passed on RTX 5090, 6/6 passed on WARP (includinga_list_keeps_the_view_address_table_it_binds).cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
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.
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_bindsfails 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 --lockedpasses apart from known flakes:modules::dstorage::tests::a_page_list_filled_after_its_request_startsfails now and then onmaintoo, and so does a parallel-run flake invictory-gpu's lib tests (watch::anddescriptor::host::tests, 2 of 40 runs on pristinemain).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.