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

Closed
github-bot wants to merge 1 commit from github-bot/gh-3574 into main AGit
Owner

@⁠101Leafy on GitHub · 2026-11-30 01:18 UTC · original
101Leafy:nv/card-windows-late-fix → main · +84 −12 · 2 files · 1 commits · closed without merging

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.

**@⁠101Leafy** on GitHub · 2026-11-30 01:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3574) `101Leafy:nv/card-windows-late-fix` → `main` · +84 −12 · 2 files · 1 commits · closed without merging 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 01:20:09 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:50 UTC · original

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.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3574#issuecomment-7321667364) 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.
github-bot closed this pull request 2026-12-01 18:58:18 +00:00

Pull request closed

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