Textures: the card detile buffer is leased per list and pooled between (VICTORY_DETILE_LEASE=1) #2338

Open
github-bot wants to merge 1 commit from github-bot/gh-2338 into main AGit
Owner

@⁠101Leafy on GitHub · 2026-11-29 12:08 UTC · original
101Leafy:nv/detile-lease → main · +119 −19 · 2 files · 1 commits · open

A texture detiled on the card keeps its linear buffer for as long as its staging buffer lives, so every texture that was ever copied holds a second copy of its bytes in video memory, even when no list has copied from it for minutes.

With VICTORY_DETILE_LEASE=1 the linear buffer is made when a list first copies from the texture and goes back to the pool once no list that copies from it is held:

  • Staging::lease takes a hold for the list before it records copies, making the buffer from the pool if no list holds one, and resets recorded so the new buffer is detiled again.
  • The list keeps a LinearLease in its deferred state; reset drops it, and the last one gives the buffer back to the pool.
  • If no buffer can be made, the texture is deferred instead of copied from a missing buffer.

Off by default; without the switch the buffer is made with the staging buffer, as before.

**@⁠101Leafy** on GitHub · 2026-11-29 12:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2338) `101Leafy:nv/detile-lease` → `main` · +119 −19 · 2 files · 1 commits · open A texture detiled on the card keeps its linear buffer for as long as its staging buffer lives, so every texture that was ever copied holds a second copy of its bytes in video memory, even when no list has copied from it for minutes. With `VICTORY_DETILE_LEASE=1` the linear buffer is made when a list first copies from the texture and goes back to the pool once no list that copies from it is held: - `Staging::lease` takes a hold for the list before it records copies, making the buffer from the pool if no list holds one, and resets `recorded` so the new buffer is detiled again. - The list keeps a `LinearLease` in its deferred state; reset drops it, and the last one gives the buffer back to the pool. - If no buffer can be made, the texture is deferred instead of copied from a missing buffer. Off by default; without the switch the buffer is made with the staging buffer, as before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 12:10:56 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/texture.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2338/head:github-bot/gh-2338'
git switch 'github-bot/gh-2338'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2338'
git switch 'github-bot/gh-2338'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2338'
git switch 'github-bot/gh-2338'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2338'
git switch 'main'
git merge --squash 'github-bot/gh-2338'
git switch 'main'
git merge --ff-only 'github-bot/gh-2338'
git switch 'main'
git merge 'github-bot/gh-2338'
git push origin 'main'
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!2338
No description provided.