GPU: a buffer in untracked memory copies the title's writes under a busy range #2269

Closed
denkencar-sketch wants to merge 1 commit from upstream-pr/2271 into main
denkencar-sketch commented 2026-11-25 09:28:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by denkencar-sketch on 2026-11-25T09:28:53Z.


Summary

update_busy returned at once when the memory is not write-watched, so a later list of the same submission read the bytes from before the title's writes. A buffer in untracked memory now copies the title's writes under a busy range. Untracked memory has no write watch, so the whole busy range is copied; that costs a copy per submission, not measured.

Testing

Test untracked_buffers_copy_title_writes_under_a_busy_range fails on main and passes with this change. cargo test --workspace --locked passes apart from the 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).

Not tried: the cost of the extra copy, and a run in the game.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6601354704 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2271). Originally posted by [denkencar-sketch](https://github.com/denkencar-sketch) on 2026-11-25T09:28:53Z. --- ## Summary `update_busy` returned at once when the memory is not write-watched, so a later list of the same submission read the bytes from before the title's writes. A buffer in untracked memory now copies the title's writes under a busy range. Untracked memory has no write watch, so the whole busy range is copied; that costs a copy per submission, not measured. ## Testing Test `untracked_buffers_copy_title_writes_under_a_busy_range` fails on `main` and passes with this change. `cargo test --workspace --locked` passes apart from the 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`). Not tried: the cost of the extra copy, and a run in the game. AI-assisted.
catminou4 commented 2026-11-25 10:07:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T09:35:40Z.

Review: COMMENTED


A buffer in untracked memory copies the title's writes under a busy range — update_busy falls back to whole-range take when untracked. 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. Closes a freshness hole for heap-allocated title buffers; includes a regression test.

<!-- greyfinch-sync:Marvisak/VIctory:review:6055074474 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2271#pullrequestreview-6055074474). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T09:35:40Z. **Review:** COMMENTED --- A buffer in untracked memory copies the title's writes under a busy range — update_busy falls back to whole-range take when untracked. 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. Closes a freshness hole for heap-allocated title buffers; includes a regression test.
Marvisak commented 2026-11-25 14:07:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T13:32:16Z.


Automated triage for the maintainers.

This pull request no longer merges cleanly into main (conflicts in crates/victory-gpu/src/shadow.rs). It will be reviewed once it is rebased onto the current main. The earlier verdict (needs-work) was for an older state of main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7163920252 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2271#issuecomment-7163920252). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T13:32:16Z. --- <!-- victory-triage v1 head=acc239d27578ad132e5ed0340c27a12de6f5f48a verdict=needs-rebase at=2026-11-25T16:20:00Z --> Automated triage for the maintainers. This pull request no longer merges cleanly into `main` (conflicts in `crates/victory-gpu/src/shadow.rs`). It will be reviewed once it is rebased onto the current `main`. The earlier verdict (needs-work) was for an older state of `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
upstream-sync closed this pull request 2026-11-26 00:01:46 +00:00
denkencar-sketch commented 2026-11-26 00:03:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by denkencar-sketch on 2026-11-25T23:15:18Z.


Closing: #2172 removed \update_busy\ and explicitly documented that untracked memory skips busy ranges because title writes there cannot be distinguished.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7177319511 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2271#issuecomment-7177319511). Originally posted by [denkencar-sketch](https://github.com/denkencar-sketch) on 2026-11-25T23:15:18Z. --- Closing: #2172 removed \update_busy\ and explicitly documented that untracked memory skips busy ranges because title writes there cannot be distinguished.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!2269
No description provided.