Skip to content

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

Closed
denkencar-sketch wants to merge 1 commit into
Marvisak:mainfrom
denkencar-sketch:fix/shadow-003
Closed

denkencar-sketch wants to merge 1 commit into
Marvisak:mainfrom
denkencar-sketch:fix/shadow-003

Conversation

@denkencar-sketch

Copy link
Copy Markdown
Contributor

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.

…usy range

update_busy returned at once when the memory is not write-watched, so a
later list of the submission read the bytes from before.

@catminou4 catminou4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Nov 25, 2026 •

Copy link
Copy Markdown
Owner

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

@denkencar-sketch

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants