Windows: card side given once a window is asked for in 2 or more frames, most asked first, behind VICTORY_CARD_WINDOWS_LATE #1756

Open
101Leafy wants to merge 1 commit from upstream-pr/1756 into main
101Leafy commented 2026-11-28 23:56:38 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-28T23:56:38Z.


A window got its side in the card's own memory as soon as it was made, so the card room went to whichever windows came first, and many of those are only read in a single frame.

With VICTORY_CARD_WINDOWS_LATE set, a window only gets card memory once it has been asked for in 2 or more frames after the one it was made in (1 means 2 frames, another number means that many), and the ones asked for in the most frames go first. The window becomes a new copy whose CPU side is the old buffer, so slots made earlier keep reading what they read before and newer slots take the card side. Only windows held by the table alone, asked for in the last frame, never written by shaders and with no side of their own are moved.

Off by default: unset or 0 gives the card side when the window is made, as before.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5545816652 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1756). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-28T23:56:38Z. --- A window got its side in the card's own memory as soon as it was made, so the card room went to whichever windows came first, and many of those are only read in a single frame. With VICTORY_CARD_WINDOWS_LATE set, a window only gets card memory once it has been asked for in 2 or more frames after the one it was made in (1 means 2 frames, another number means that many), and the ones asked for in the most frames go first. The window becomes a new copy whose CPU side is the old buffer, so slots made earlier keep reading what they read before and newer slots take the card side. Only windows held by the table alone, asked for in the last frame, never written by shaders and with no side of their own are moved. Off by default: unset or 0 gives the card side when the window is made, as before.
trustno1-coder commented 2026-11-29 08:28:28 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-29T08:28:28Z.


Thank you! An earlier version of this pull request was merged into main with its original commits and is part of v2026.11.29.01, where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7253127222 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1756#issuecomment-7253127222). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-29T08:28:28Z. --- Thank you! An earlier version of this pull request was merged into main with its original commits and is part of [v2026.11.29.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.29.01), where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.
101Leafy commented 2026-11-29 21:42:50 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-29T21:42:50Z.


On hold. A desk run with VICTORY_CARD_WINDOWS_LATE=1 moved no window to the card: 0 on the card, 0 turned away, against 913 on the card in the run without it. The filter in card_late_windows wants a window that only the table holds and that was asked for in the last frame. A window read every frame is always held by a list still in the air, so none is ever due.

main already has this as 1d5fd8583b. The switch is off by default, so nothing changes unless it is set. I'm working on a fix and will post back here with a run that shows windows moving, or close this if it can't be made to work.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7263091697 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1756#issuecomment-7263091697). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-29T21:42:50Z. --- On hold. A desk run with VICTORY_CARD_WINDOWS_LATE=1 moved no window to the card: 0 on the card, 0 turned away, against 913 on the card in the run without it. The filter in card_late_windows wants a window that only the table holds and that was asked for in the last frame. A window read every frame is always held by a list still in the air, so none is ever due. main already has this as 1d5fd8583b. The switch is off by default, so nothing changes unless it is set. I'm working on a fix and will post back here with a run that shows windows moving, or close this if it can't be made to work.
101Leafy commented 2026-11-30 01:18:17 +00:00 (Migrated from github.com)

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


The fix for the hold is in #3574: windows still held by recorded lists can move now, and a desk run put 396 windows on the card with the switch on (0 before).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7266022759 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1756#issuecomment-7266022759). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-30T01:18:17Z. --- The fix for the hold is in #3574: windows still held by recorded lists can move now, and a desk run put 396 windows on the card with the switch on (0 before).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1756:upstream-pr/1756'
git switch 'upstream-pr/1756'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1756'
git switch 'upstream-pr/1756'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1756'
git switch 'upstream-pr/1756'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1756'
git switch 'main'
git merge --squash 'upstream-pr/1756'
git switch 'main'
git merge --ff-only 'upstream-pr/1756'
git switch 'main'
git merge 'upstream-pr/1756'
git push origin 'main'
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!1756
No description provided.