Window arena: pool tiles taken at first fill (VICTORY_ARENA_LAZY=1, off by default) #5014

Open
xteral67 wants to merge 9 commits from upstream-pr/5014 into main
xteral67 commented 2026-12-01 17:17:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by xteral67 on 2026-12-01T17:17:51Z.


Depends on #4750 and #4922 (this branch is built on #4922).

What it changes

With the window arena on, every tile of a window takes a 64 KiB tile of the PC pool when the window is made. Many tiles are never written by the title, so that memory is held for nothing.

With VICTORY_ARENA_LAZY=1 a window tile takes a pool tile only when title bytes are first written into it. Until then:

  • the card side of the tile is mapped to nothing, so the card reads zeros (tiled resources tier 2 and up; on tier 1 tiles are taken as before);
  • the CPU side is one shared read-only tile of zeros, so CPU and card read the same.

A window that shaders are declared to write takes all its tiles at once, because card writes into a tile mapped to nothing would be lost. The diagnostics build also counts window tiles that were never filled.

Off by default. With the switch off nothing changes.

How it was tested

  • RTX 3080 Ti 12 GB, 32 GB RAM, Series X profile, 1440p output, DLSS quality, FSR 3 frame generation 2x.
  • One 26-minute drive into the biggest city, diagnostics build, with the window arena and #4922 on.
  • Before (counter, switch off): 640-690 MB of the 4.5 GB pool were never filled from title memory.
  • After: about 547 MB less pool memory. No crash, no picture problem seen by the player.
  • One run only. Not run: cargo test, other cards, Series S profile, a card with tiled resources tier 1.
  • Draft until CI has built this branch; the same change was built and played in a local tree.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #4750, #4922, #4860

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5590752798 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/5014). Originally posted by [xteral67](https://github.com/xteral67) on 2026-12-01T17:17:51Z. --- Depends on #4750 and #4922 (this branch is built on #4922). ## What it changes With the window arena on, every tile of a window takes a 64 KiB tile of the PC pool when the window is made. Many tiles are never written by the title, so that memory is held for nothing. With `VICTORY_ARENA_LAZY=1` a window tile takes a pool tile only when title bytes are first written into it. Until then: - the card side of the tile is mapped to nothing, so the card reads zeros (tiled resources tier 2 and up; on tier 1 tiles are taken as before); - the CPU side is one shared read-only tile of zeros, so CPU and card read the same. A window that shaders are declared to write takes all its tiles at once, because card writes into a tile mapped to nothing would be lost. The diagnostics build also counts window tiles that were never filled. Off by default. With the switch off nothing changes. ## How it was tested - RTX 3080 Ti 12 GB, 32 GB RAM, Series X profile, 1440p output, DLSS quality, FSR 3 frame generation 2x. - One 26-minute drive into the biggest city, diagnostics build, with the window arena and #4922 on. - Before (counter, switch off): 640-690 MB of the 4.5 GB pool were never filled from title memory. - After: about 547 MB less pool memory. No crash, no picture problem seen by the player. - One run only. Not run: `cargo test`, other cards, Series S profile, a card with tiled resources tier 1. - Draft until CI has built this branch; the same change was built and played in a local tree. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #4750, #4922, #4860 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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/5014:upstream-pr/5014'
git switch 'upstream-pr/5014'

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