Windows: late card sides move windows lists still hold (VICTORY_CARD_WINDOWS_LATE) #3574

Closed
101Leafy wants to merge 1 commit from upstream-pr/3574 into main
101Leafy commented 2026-11-30 01:18:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-30T01:18:10Z.


Follow-up to #1756. With VICTORY_CARD_WINDOWS_LATE=1 on main, no window ever got a card side: card_late_windows only took a window the table alone held (strong count 1), and any window asked for in the last frame is also held by a recorded list or pass, so the filter never matched.

Now a window still held by lists can move. Passes and lists recorded before the move keep the old copy and bring it up to date at their submission as before, into the same CPU side they read. What that changes also goes up to the new copy's card side through Shadow::moved. The new copy starts with the old one's pages as copied and goes up once. A window stays where it is if shaders wrote it or store into it by address, if a refresh is pending on it, or if another copy took it over. Nothing moves while VICTORY_GROW is on.

copystat counts the late windows per line.

Desk run on GTA VI (RTX, Windows 10), switch on, built on our train: 396 windows on the card (589 MB), 24-32 late windows per copystat line (48-56 MB), none turned away for room. Before this change the same switch gave 0 on the card. FPS was lower than our run without the switch, so it stays off by default; this makes the switch do what it says so it can be measured.

cargo test -p victory-gpu --lib late: 17 passed.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5557268295 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3574). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-30T01:18:10Z. --- Follow-up to #1756. With VICTORY_CARD_WINDOWS_LATE=1 on main, no window ever got a card side: card_late_windows only took a window the table alone held (strong count 1), and any window asked for in the last frame is also held by a recorded list or pass, so the filter never matched. Now a window still held by lists can move. Passes and lists recorded before the move keep the old copy and bring it up to date at their submission as before, into the same CPU side they read. What that changes also goes up to the new copy's card side through `Shadow::moved`. The new copy starts with the old one's pages as copied and goes up once. A window stays where it is if shaders wrote it or store into it by address, if a refresh is pending on it, or if another copy took it over. Nothing moves while VICTORY_GROW is on. copystat counts the late windows per line. Desk run on GTA VI (RTX, Windows 10), switch on, built on our train: 396 windows on the card (589 MB), 24-32 late windows per copystat line (48-56 MB), none turned away for room. Before this change the same switch gave 0 on the card. FPS was lower than our run without the switch, so it stays off by default; this makes the switch do what it says so it can be measured. `cargo test -p victory-gpu --lib late`: 17 passed.
trustno1-coder commented 2026-12-01 18:50:57 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:50:57Z.


Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321667364 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3574#issuecomment-7321667364). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:50:57Z. --- Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

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
trustno1-coder/VIctory-NVIDIA!3574
No description provided.