descriptor: a waiting slot keeps the texture it shows, whatever the room #503

Manually merged
github merged 1 commit from github-bot/gh-503 into gh-pr/503/base 2026-12-04 20:33:41 +00:00 AGit
Owner

@⁠YaBulochka on GitHub · 2026-12-04 19:37 UTC · original
YaBulochka:pr/keep-shown → main · +4 −4 · 1 files · 1 commits · merged 2026-12-04 20:32 UTC

Problem

A slot whose texture is not shown yet falls back to the neutral texture unless resource::room_lately() lets it keep the previous one:

kin => crate::resource::room_lately() && kin.kept(KEEP_SHOWN),

With the texture line at 86–93 % of the card's budget (what a full 8 GiB card runs at) room_lately() is false most of the time, so waiting slots show neutral gray for a frame or two and then the texture. On a small card that is a constant flicker between the old picture and gray.

Change

Keep the shown texture for the wait in all four places, regardless of the room. Nothing else changes: the reasons a slot goes neutral, the pool, the residency.

Measured (same world, same save, log level info)

Of the slots shown after their texture's upload, the neutral texture was shown meanwhile in:

run slots shown neutral meanwhile share
before 300 000 236 675 79 %
before 195 000 162 770 83 %
before 85 000 73 345 86 %
after 175 000 95 462 55 %

The neutral-reason counters are unchanged (all new slot), so this does not change why a slot waits, only what it shows while it does.

Test PC: RX 7600 XT 8 GB, RADV, Series S, FSR host. Visually the flicker between the old picture and gray went from constant to occasional.

Cost

A waiting slot holds its previous texture for the wait, so one more texture per waiting slot stays alive. The pool's staying accounting still decides when a block retires; on the same runs the texture-block count and the VRAM line did not move beyond their usual spread.

**@⁠YaBulochka** on GitHub · 2026-12-04 19:37 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/503) `YaBulochka:pr/keep-shown` → `main` · +4 −4 · 1 files · 1 commits · merged 2026-12-04 20:32 UTC ## Problem A slot whose texture is not shown yet falls back to the neutral texture unless `resource::room_lately()` lets it keep the previous one: ```rust kin => crate::resource::room_lately() && kin.kept(KEEP_SHOWN), ``` With the texture line at 86–93 % of the card's budget (what a full 8 GiB card runs at) `room_lately()` is false most of the time, so waiting slots show neutral gray for a frame or two and then the texture. On a small card that is a constant flicker between the old picture and gray. ## Change Keep the shown texture for the wait in all four places, regardless of the room. Nothing else changes: the reasons a slot goes neutral, the pool, the residency. ## Measured (same world, same save, log level info) Of the slots shown after their texture's upload, the neutral texture was shown meanwhile in: | run | slots shown | neutral meanwhile | share | |---|---|---|---| | before | 300 000 | 236 675 | 79 % | | before | 195 000 | 162 770 | 83 % | | before | 85 000 | 73 345 | 86 % | | **after** | **175 000** | **95 462** | **55 %** | The neutral-reason counters are unchanged (all `new slot`), so this does not change *why* a slot waits, only what it shows while it does. Test PC: RX 7600 XT 8 GB, RADV, Series S, FSR host. Visually the flicker between the old picture and gray went from constant to occasional. ## Cost A waiting slot holds its previous texture for the wait, so one more texture per waiting slot stays alive. The pool's `staying` accounting still decides when a block retires; on the same runs the texture-block count and the VRAM line did not move beyond their usual spread.
A slot whose texture is not shown yet went to the neutral texture unless
`resource::room_lately()` allowed keeping the old one. With the texture line
at 86-93 % of the budget room_lately() is false most of the time, so most
waiting slots showed neutral gray for a frame or two and then the texture.

Measured in the same world, same save, log level info: of the slots shown
after their texture's upload, the neutral texture was shown meanwhile in
300,000/236,675 (79 %), 195,000/162,770 (83 %) and 85,000/73,345 (86 %) of
them before this change, and 175,000/95,462 (55 %) after. The reasons a slot
goes neutral are unchanged (all "new slot"); what changes is what a waiting
slot shows.

Visual result on the test PC (RX 7600 XT 8 GB, RADV): the flicker between the
old picture and neutral gray went from constant to occasional. The cost is
that a waiting slot holds its previous texture for the wait, so one more
texture per waiting slot is alive; the pool's `staying` accounting still
governs when a block retires.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 19:43:22 +00:00
github-bot changed target branch from main to gh-pr/503/base 2026-12-04 20:33:33 +00:00
github manually merged commit a863a79c88 into gh-pr/503/base 2026-12-04 20:33:41 +00:00
Author
Owner

@⁠t-jonesy on GitHub · 2026-12-05 14:19 UTC · original

A data point for anyone tempted to raise KEEP_SHOWN to 2 (keep the old view for Kin::Other too): we did that in a fork, and it showed another material's texture for a frame or two.

What we ran. Our fork kept a waiting slot's old view for any texture of the same dimension, whatever the room. That is #503's change plus Kin::Other. On an RX 9070 XT at 89-94% of the texture budget it gave a one-frame artefact:

  • What it looked like: a surface's base colour replaced by a foreign image, mapped with the surface's own UVs. The grime layer, lighting and geometry stay.
  • Where: an umbrella canopy in saturated green/purple/cyan patches, and another time in another prop's blue-violet albedo; and a patch of river shown as muted red/green/olive blocks.
  • Scale: the blocks are in texture space, soft-edged, so a low-resolution texture magnified.
  • How often: 2 of about 45 shots with the umbrella in view in high-churn phases, 1 of 75 shots on the downtown route. Shots before and after were always clean.

The counters say most kept slots are another texture. Main's since-start line (slots that showed a texture and were written with another …) read, after 15,000 rewrites on the route:

  • 567 the same kind elsewhere;
  • 2,131 another size;
  • 12,290 others;
  • 12 another dimension.

So about 82% of the rewrites of a shown slot are Kin::Other. With KEEP_SHOWN = 2 all of those keep showing the previous, unrelated texture until the new upload runs. Our format-family check did not stop it: BC1/BC3/BC7 and RGBA8 are all the same channel class, and it refused only 2-5 per 5 s against 1.5-6.7k kept.

What it means for main. Main's rule (Kin::Same, and Moved/Sized with KEEP_SHOWN = 1) keeps only the same image. The ~82% Other share is probably also part of why #503's measured neutral share fell to 55% and not lower: those slots still show the neutral grey for a frame. A frame of grey is much less visible than a frame of another material, so we are testing main's rule again in our fork. Our first visual A/B was inconclusive, so we can't yet say main's rule removes the garbage entirely. A second, rarer variant could be a kept view whose host copy is uploaded again after the title reused its memory with the same start and length but another format.

If someone wants to shorten the Other grey frame, the option we would look at is to show the new texture's smallest uploaded levels at once, rather than the old texture.

**@⁠t-jonesy** on GitHub · 2026-12-05 14:19 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/503#issuecomment-7439476502) A data point for anyone tempted to raise `KEEP_SHOWN` to 2 (keep the old view for `Kin::Other` too): we did that in a fork, and it showed another material's texture for a frame or two. **What we ran.** Our fork kept a waiting slot's old view for any texture of the same dimension, whatever the room. That is #503's change plus `Kin::Other`. On an RX 9070 XT at 89-94% of the texture budget it gave a one-frame artefact: - **What it looked like:** a surface's base colour replaced by a foreign image, mapped with the surface's own UVs. The grime layer, lighting and geometry stay. - **Where:** an umbrella canopy in saturated green/purple/cyan patches, and another time in another prop's blue-violet albedo; and a patch of river shown as muted red/green/olive blocks. - **Scale:** the blocks are in texture space, soft-edged, so a low-resolution texture magnified. - **How often:** 2 of about 45 shots with the umbrella in view in high-churn phases, 1 of 75 shots on the `downtown` route. Shots before and after were always clean. **The counters say most kept slots are another texture.** Main's since-start line (`slots that showed a texture and were written with another …`) read, after 15,000 rewrites on the route: - 567 the same kind elsewhere; - 2,131 another size; - **12,290 others**; - 12 another dimension. So about 82% of the rewrites of a shown slot are `Kin::Other`. With `KEEP_SHOWN = 2` all of those keep showing the previous, unrelated texture until the new upload runs. Our format-family check did not stop it: BC1/BC3/BC7 and RGBA8 are all the same channel class, and it refused only 2-5 per 5 s against 1.5-6.7k kept. **What it means for main.** Main's rule (`Kin::Same`, and `Moved`/`Sized` with `KEEP_SHOWN = 1`) keeps only the same image. The ~82% `Other` share is probably also part of why #503's measured neutral share fell to 55% and not lower: those slots still show the neutral grey for a frame. A frame of grey is much less visible than a frame of another material, so we are testing main's rule again in our fork. Our first visual A/B was inconclusive, so we can't yet say main's rule removes the garbage entirely. A second, rarer variant could be a kept view whose host copy is uploaded again after the title reused its memory with the same start and length but another format. If someone wants to shorten the `Other` grey frame, the option we would look at is to show the new texture's smallest uploaded levels at once, rather than the old texture.
This discussion has been locked. Commenting is limited to contributors.
No description provided.