Texture slots keep the texture they show until the new one has uploaded (VICTORY_KEEP_SHOWN=2 by default) #4719

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

@⁠DoubleD17 on GitHub · 2026-12-01 03:24 UTC · original
DoubleD17:fix/keep-shown-any-same-dimension → main · +17 −8 · 2 files · 1 commits · closed without merging

What it changes

When the title rewrites a texture slot with another texture, the slot has to show something until the new texture is made and its upload has run. Today (VICTORY_KEEP_SHOWN unset, which means checked):

  • Same texture moved elsewhere: the slot keeps the old view only when both memories begin and end with the same 4 KiB.
  • Everything else, including any other texture of the same dimension: the slot shows the neutral grey texture.

On a card at its budget, new textures wait for room ("no room, new textures wait" in the 5 s texture-queue line). The grey then lasts and shows as grey flicker or pop on surfaces. On an RTX 5070 12 GB the queue was at its line in most 5 s lines of every run below.

This makes 2 the default: a slot keeps showing any texture of the same dimension until the new one has uploaded. checked, 1 and 0 stay available, unchanged. The README row and the doc comments say so.

The trade-off is the one keep_checked's comment names: a kept texture can belong to something else (rainbow noise, another character's map) until the upload lands. We looked for that and did not see it (below), but it is the reason checked was the default, so it is worth a look on other scenes.

How it was tested

  • Hardware: RTX 5070 12 GB (driver 621.40), Ryzen 7 5800X, 64 GB RAM, Windows 11.
  • Build: main e1251c31, release, with --set VICTORY_KEEP_SHOWN=2 against unset. This PR only flips that default, rebased on de21ed57.
  • Profile: Series X, 2560x1440 DLAA, frame generation off, ray tracing off; idle camera from a fixed save, 150 s per run, runs alternated.

Grey slots per 150 s run, from the "slots that showed a texture and were written with another" line:

moved and shown grey kept
unset (checked), 6 runs 19,961 to 26,115 (plus 32,000 to 43,000 "others" not kept) 2,333 to 22,002
2, 4 runs 0 129,059 to 220,311

Picture:

  • End bursts at 10 frames a second: 2 runs of 600 frames and 2 of 200 with 2.
  • Every frame that a frame-to-frame check flagged was looked at.
  • With 2, none showed another object's texture on any surface, clothing included. The flagged frames were the one-frame vegetation gap, which the unset runs show as well.
  • One unset run had a frame with several swapped textures.

Frame time: 2+2 runs, light views.

CPU per frame fps
2 against unset −4.5 ms +2.6 %

That is within the run-to-run noise of this PC, so there is no cost.

Play:

  • 34 minutes, Series S profile, DLSS, frame generation 2x, KEEP_SHOWN=2 (the user also had VICTORY_TEXTURE_ROOM_PERCENT=88).
  • Grey slots: 0, against 27,351 in the first 3.5 minutes of a session with the default.
  • The player reported less texture glitching.

Checks on this branch:

  • cargo clippy --workspace --all-targets --locked -- -D warnings: it stops on five findings in crates/victory-gpu/src/host/font.rs:213,260, host/menu.rs:667 and host/panel.rs:602,668. The same five appear on de21ed57 without this change; this PR touches none of those files. #4708 fixes them (its check job passed); this PR's check should pass once that is on main.
  • cargo test --workspace --locked: victory-gpu 1,095 passed. One test elsewhere, victory-loader console_insn::tests::clzero_on_a_guarded_line_goes_through_the_guard, failed once in the full run and passed when run on its own (cargo test -p victory-loader console_insn: 10 passed). That crate is untouched here.

Not tested: AMD and Intel cards, other parts of the map, sessions longer than 34 minutes, ray tracing on.

Checked for overlap

  • I searched the open and closed pull requests and issues for KEEP_SHOWN and for grey texture flicker. I also listed the open pull requests that change crates/victory-gpu/src/descriptor/host.rs: about 30, none of which changes keep_shown/keep_checked. Related: none found.

AI Assisted

**@⁠DoubleD17** on GitHub · 2026-12-01 03:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4718) `DoubleD17:fix/keep-shown-any-same-dimension` → `main` · +17 −8 · 2 files · 1 commits · closed without merging ## What it changes When the title rewrites a texture slot with another texture, the slot has to show something until the new texture is made and its upload has run. Today (`VICTORY_KEEP_SHOWN` unset, which means `checked`): - **Same texture moved elsewhere:** the slot keeps the old view only when both memories begin and end with the same 4 KiB. - **Everything else**, including any other texture of the same dimension: the slot shows the neutral grey texture. On a card at its budget, new textures wait for room ("no room, new textures wait" in the 5 s texture-queue line). The grey then lasts and shows as grey flicker or pop on surfaces. On an RTX 5070 12 GB the queue was at its line in most 5 s lines of every run below. This makes `2` the default: a slot keeps showing any texture of the same dimension until the new one has uploaded. `checked`, `1` and `0` stay available, unchanged. The README row and the doc comments say so. The trade-off is the one `keep_checked`'s comment names: a kept texture can belong to something else (rainbow noise, another character's map) until the upload lands. We looked for that and did not see it (below), but it is the reason `checked` was the default, so it is worth a look on other scenes. ## How it was tested - **Hardware:** RTX 5070 12 GB (driver 621.40), Ryzen 7 5800X, 64 GB RAM, Windows 11. - **Build:** main e1251c31, release, with `--set VICTORY_KEEP_SHOWN=2` against unset. This PR only flips that default, rebased on de21ed57. - **Profile:** Series X, 2560x1440 DLAA, frame generation off, ray tracing off; idle camera from a fixed save, 150 s per run, runs alternated. **Grey slots per 150 s run**, from the "slots that showed a texture and were written with another" line: | | moved and shown grey | kept | |---|---|---| | unset (`checked`), 6 runs | 19,961 to 26,115 (plus 32,000 to 43,000 "others" not kept) | 2,333 to 22,002 | | `2`, 4 runs | 0 | 129,059 to 220,311 | **Picture:** - End bursts at 10 frames a second: 2 runs of 600 frames and 2 of 200 with `2`. - Every frame that a frame-to-frame check flagged was looked at. - With `2`, none showed another object's texture on any surface, clothing included. The flagged frames were the one-frame vegetation gap, which the unset runs show as well. - One unset run had a frame with several swapped textures. **Frame time:** 2+2 runs, light views. | | CPU per frame | fps | |---|---|---| | `2` against unset | −4.5 ms | +2.6 % | That is within the run-to-run noise of this PC, so there is no cost. **Play:** - 34 minutes, Series S profile, DLSS, frame generation 2x, `KEEP_SHOWN=2` (the user also had `VICTORY_TEXTURE_ROOM_PERCENT=88`). - Grey slots: 0, against 27,351 in the first 3.5 minutes of a session with the default. - The player reported less texture glitching. **Checks on this branch:** - `cargo clippy --workspace --all-targets --locked -- -D warnings`: it stops on five findings in `crates/victory-gpu/src/host/font.rs:213,260`, `host/menu.rs:667` and `host/panel.rs:602,668`. The same five appear on de21ed57 without this change; this PR touches none of those files. #4708 fixes them (its `check` job passed); this PR's `check` should pass once that is on main. - `cargo test --workspace --locked`: `victory-gpu` 1,095 passed. One test elsewhere, `victory-loader` `console_insn::tests::clzero_on_a_guarded_line_goes_through_the_guard`, failed once in the full run and passed when run on its own (`cargo test -p victory-loader console_insn`: 10 passed). That crate is untouched here. **Not tested:** AMD and Intel cards, other parts of the map, sessions longer than 34 minutes, ray tracing on. ## Checked for overlap - [x] I searched the open and closed pull requests and issues for `KEEP_SHOWN` and for grey texture flicker. I also listed the open pull requests that change `crates/victory-gpu/src/descriptor/host.rs`: about 30, none of which changes `keep_shown`/`keep_checked`. Related: none found. AI Assisted
VICTORY_KEEP_SHOWN defaults to 2 instead of checked: a slot rewritten
with another texture of the same dimension goes on showing what it
showed until the new texture is made and its upload has run, instead of
the neutral grey. On a card at its budget new textures wait for room,
and under checked that showed as grey flicker: about 60,000 slots in a
150 s run on an RTX 5070 12 GB. checked, 1 and 0 stay available.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 03:28:09 +00:00
Author
Owner

@⁠nick0451 on GitHub · 2026-12-01 04:18 UTC · original

A second card for this, one with room to spare: RTX 3090 24 GB, driver 610.88, i9-14900K, 32 GB, Series S, DLSS performance, no frame generation or ray tracing. Official v2026.11.30.03 with --set VICTORY_KEEP_SHOWN=2 against unset, 3 + 3 starts alternating, off-screen. Idle camera at a frozen balcony save, 150 s in the world, then a 60-frame burst at 24–27 frames/s. Both arms ran with VICTORY_SHADER_OPT=445, so the #4188 hair didn't add per-frame noise.

shown neutral (moved, other bytes) kept fps (last 6 host lines)
unset, 3 runs 18,378 / 17,218 / 16,226 5,258 / 5,364 / 5,184 29.0 / 28.2 / 28.7
2, 3 runs 0 / 0 / 0 238,635 / 228,664 / 264,278 29.2 / 29.8 / 29.3
  • So even a 24 GB card, nowhere near its budget, shows about 16–18 thousand neutral slots per 150 s with checked, and 2 keeps all of them.
  • Picture: in the 6 × 60 frames, a frame-to-frame check (a frame that differs from both neighbours more than they differ from each other) flagged nothing in either arm. The frames I looked at showed no texture on the wrong object, clothing and the character included.
  • fps: +0.8 on average, within this PC's noise.

Limits: one idle view, no movement or driving, so a stream-heavy scene where a kept texture belongs to something else for longer isn't covered here.

**@⁠nick0451** on GitHub · 2026-12-01 04:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4718#issuecomment-7300593053) A second card for this, one with room to spare: RTX 3090 24 GB, driver 610.88, i9-14900K, 32 GB, Series S, DLSS performance, no frame generation or ray tracing. Official v2026.11.30.03 with `--set VICTORY_KEEP_SHOWN=2` against unset, 3 + 3 starts alternating, off-screen. Idle camera at a frozen balcony save, 150 s in the world, then a 60-frame burst at 24–27 frames/s. Both arms ran with `VICTORY_SHADER_OPT=445`, so the #4188 hair didn't add per-frame noise. | | shown neutral (moved, other bytes) | kept | fps (last 6 host lines) | |---|---|---|---| | unset, 3 runs | 18,378 / 17,218 / 16,226 | 5,258 / 5,364 / 5,184 | 29.0 / 28.2 / 28.7 | | `2`, 3 runs | 0 / 0 / 0 | 238,635 / 228,664 / 264,278 | 29.2 / 29.8 / 29.3 | - So even a 24 GB card, nowhere near its budget, shows about 16–18 thousand neutral slots per 150 s with `checked`, and `2` keeps all of them. - **Picture:** in the 6 × 60 frames, a frame-to-frame check (a frame that differs from both neighbours more than they differ from each other) flagged nothing in either arm. The frames I looked at showed no texture on the wrong object, clothing and the character included. - fps: +0.8 on average, within this PC's noise. Limits: one idle view, no movement or driving, so a stream-heavy scene where a kept texture belongs to something else for longer isn't covered here.
Author
Owner

@⁠nick0451 on GitHub · 2026-12-01 06:38 UTC · original

Following up with the case I said wasn't covered: a watched driving session with VICTORY_KEEP_SHOWN=2. Same RTX 3090, driver 610.88, Series S profile. The build was main f5c3d243 with #4695 (so neither the leak nor the retry stutter) and VICTORY_SHADER_OPT=445. A person drove through the city on the left monitor for about 10 of the 10.7 minutes in the world. Rolling 30-frame captures at about 15 frames/s ran the whole time, with the same frame-to-frame check as before.

  • The driver saw nothing wrong: no texture on the wrong object, no swapped car or pedestrian textures. Their words: much cleaner than the previous day's build.
  • Slot line at the end: 1,365,225 kept, 0 shown neutral.
  • What the check did flag: twice, the same one-frame drop of a hedge and grass strip by a house, before the drive. That's the vegetation gap you describe, which you saw without 2 as well. Nothing was flagged while driving, though the check is less sensitive while the camera moves.
  • Unrelated to this PR, for whoever looks at streaming: while driving, about half the seconds had a frame over 100 ms, with stalls of 4.5–7.4 s as new streets came in.
**@⁠nick0451** on GitHub · 2026-12-01 06:38 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4718#issuecomment-7303101117) Following up with the case I said wasn't covered: a watched driving session with `VICTORY_KEEP_SHOWN=2`. Same RTX 3090, driver 610.88, Series S profile. The build was main `f5c3d243` with #4695 (so neither the leak nor the retry stutter) and `VICTORY_SHADER_OPT=445`. A person drove through the city on the left monitor for about 10 of the 10.7 minutes in the world. Rolling 30-frame captures at about 15 frames/s ran the whole time, with the same frame-to-frame check as before. - **The driver saw nothing wrong:** no texture on the wrong object, no swapped car or pedestrian textures. Their words: much cleaner than the previous day's build. - **Slot line at the end:** 1,365,225 kept, 0 shown neutral. - **What the check did flag:** twice, the same one-frame drop of a hedge and grass strip by a house, before the drive. That's the vegetation gap you describe, which you saw without `2` as well. Nothing was flagged while driving, though the check is less sensitive while the camera moves. - **Unrelated to this PR, for whoever looks at streaming:** while driving, about half the seconds had a frame over 100 ms, with stalls of 4.5–7.4 s as new streets came in.
Author
Owner

@⁠kodifan on GitHub · 2026-12-01 11:03 UTC · original

Confirmation from a different card and CPU, on a build made of main (5fabb46e) with this PR, #4775 and #4636 merged in (local release build, cargo build --release -p victory).

Hardware: RTX 5060 Ti 16 GB (15.9 GB of its own), Ryzen 7 7700 (32 MB L3), 32 GB DDR5-6000, Windows 11 26200, driver 621.24.
Settings: Series X profile, 2560x1440 output, DLSS Performance, Frame Generation on, texture room 70 % -> VRAM at 15.2 of 16.3 GB, texture loading all detail. So the card sits at its budget in most scenes, which is the case this PR describes.

Before (v2026.11.29.05, same settings): road and wall surfaces flickered continuously. The log showed why, and it matches your description exactly - six adjacent texture slots (two of 2,176 KB, four of 544 KB) rewritten by the title about every 2.7 s and re-uploaded after the fact:

victory_gpu::draw: a texture picked by index changed after its upload with nothing to
tell of it: uploaded again ... slot=94208 bytes=2228224 ...

Those 200 warnings over ~2 minutes remained in the new build, i.e. the title still rewrites them behind the layer's back - what changed is what the screen shows while the new texture waits for room.

After: the player's verdict was "almost flicker free". No grey or neutral pops observed on roads, walls or terrain in a normal 10-minute session. Frame times were unaffected (p99 50-72 ms, none over 100, 7.5 us per draw).

Caveat on attribution: three PRs went in together, so this is not a clean single-variable test. #4775 touches the refresh path and could in principle change upload timing, and #4636 changes present pacing. But the visual change - grey placeholder gone - is what KEEP_SHOWN=2 is for, and it is the only one of the three that names it.

Also worth knowing: with the same build, VICTORY_INDIRECT_REST=0 removed the tree flicker on the same machine (docs/findings.md calls that the suspected cause of outdoor flicker). So two separate faults, two separate fixes, both confirmed here on a card at its VRAM budget.

Happy to run a single-variable build (+ this PR only) if you want that attribution nailed down.

**@⁠kodifan** on GitHub · 2026-12-01 11:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4718#issuecomment-7309115601) Confirmation from a different card and CPU, on a build made of `main` (5fabb46e) with this PR, #4775 and #4636 merged in (local release build, `cargo build --release -p victory`). **Hardware:** RTX 5060 Ti 16 GB (15.9 GB of its own), Ryzen 7 7700 (32 MB L3), 32 GB DDR5-6000, Windows 11 26200, driver 621.24. **Settings:** Series X profile, 2560x1440 output, DLSS Performance, Frame Generation on, texture room 70 % -> **VRAM at 15.2 of 16.3 GB**, texture loading all detail. So the card sits at its budget in most scenes, which is the case this PR describes. **Before** (v2026.11.29.05, same settings): road and wall surfaces flickered continuously. The log showed why, and it matches your description exactly - six adjacent texture slots (two of 2,176 KB, four of 544 KB) rewritten by the title about every 2.7 s and re-uploaded after the fact: ``` victory_gpu::draw: a texture picked by index changed after its upload with nothing to tell of it: uploaded again ... slot=94208 bytes=2228224 ... ``` Those 200 warnings over ~2 minutes remained in the new build, i.e. the title still rewrites them behind the layer's back - what changed is what the screen shows while the new texture waits for room. **After:** the player's verdict was "almost flicker free". No grey or neutral pops observed on roads, walls or terrain in a normal 10-minute session. Frame times were unaffected (p99 50-72 ms, none over 100, 7.5 us per draw). Caveat on attribution: three PRs went in together, so this is not a clean single-variable test. #4775 touches the refresh path and could in principle change upload timing, and #4636 changes present pacing. But the visual change - grey placeholder gone - is what `KEEP_SHOWN=2` is for, and it is the only one of the three that names it. Also worth knowing: with the same build, `VICTORY_INDIRECT_REST=0` removed the *tree* flicker on the same machine (`docs/findings.md` calls that the suspected cause of outdoor flicker). So two separate faults, two separate fixes, both confirmed here on a card at its VRAM budget. Happy to run a single-variable build (+ this PR only) if you want that attribution nailed down.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 18:16 UTC · original

The follow-up in #4860 gives an isolated comparison of this default. The tester used a clean 5fabb46e build on an RTX 5090 under Linux, with the same save and route, changing only VICTORY_KEEP_SHOWN.

The continuous flashing while walking was present with checked, disappeared with 2, and came back when checked was restored. With 2, they still saw occasional gray-to-texture transitions and a briefly incorrect nearby texture. The result supports the flicker reduction on that setup and records the visual trade-off for a global default.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 18:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4718#issuecomment-7320669829) [The follow-up in #4860](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/issues/4860) gives an isolated comparison of this default. The tester used a clean `5fabb46e` build on an RTX 5090 under Linux, with the same save and route, changing only `VICTORY_KEEP_SHOWN`. The continuous flashing while walking was present with `checked`, disappeared with `2`, and came back when `checked` was restored. With `2`, they still saw occasional gray-to-texture transitions and a briefly incorrect nearby texture. The result supports the flicker reduction on that setup and records the visual trade-off for a global default.
Author
Owner

@⁠transbinaryunicorn-sys on GitHub · 2026-12-01 18:22 UTC · original · edited 2026-12-01 18:24 UTC

Test report for this default, from #4860: RTX 5090, Linux (GE-Proton11-14, vkd3d-proton master), clean main 5fabb46e, normal release build, upstream defaults, ray tracing off, same save and walking route each run, only VICTORY_KEEP_SHOWN changed (that's all this PR changes).

kept what they showed flashing while walking
checked (current default) 1,358 yes, constantly
2 (this PR) 409,432 none

Back and forth on the same build: the flashing comes back with checked and goes away with 2. With 2, now and then a texture visibly switches from gray, or one nearby is briefly not quite right; for playing that's far less noticeable than the flashing. Details and counters: #4860

Note: I tested the switch on clean main, not this branch itself. The PR only flips the default, so it should be the same.

**@⁠transbinaryunicorn-sys** on GitHub · 2026-12-01 18:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4718#issuecomment-7320852152) · edited 2026-12-01 18:24 UTC Test report for this default, from #4860: RTX 5090, Linux (GE-Proton11-14, vkd3d-proton master), clean `main` 5fabb46e, normal release build, upstream defaults, ray tracing off, same save and walking route each run, only `VICTORY_KEEP_SHOWN` changed (that's all this PR changes). | | kept what they showed | flashing while walking | |---|---|---| | `checked` (current default) | 1,358 | yes, constantly | | `2` (this PR) | 409,432 | none | Back and forth on the same build: the flashing comes back with `checked` and goes away with `2`. With `2`, now and then a texture visibly switches from gray, or one nearby is briefly not quite right; for playing that's far less noticeable than the flashing. Details and counters: https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/issues/4860 Note: I tested the switch on clean main, not this branch itself. The PR only flips the default, so it should be the same.
github-bot closed this pull request 2026-12-01 18:36:35 +00:00
Author
Owner

@⁠DoubleD17 on GitHub · 2026-12-01 18:32 UTC · original

Closing this: main now sets VICTORY_KEEP_SHOWN=2 by default in victory play (f4a8eeeb, from discussion #4670 / PR #4603), which is what this pull request asked for. The layer's own default stays checked, but victory play is how the game is started, so this change is no longer needed.

AI Assisted

**@⁠DoubleD17** on GitHub · 2026-12-01 18:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4718#issuecomment-7321111388) Closing this: main now sets `VICTORY_KEEP_SHOWN=2` by default in `victory play` (f4a8eeeb, from discussion #4670 / PR #4603), which is what this pull request asked for. The layer's own default stays `checked`, but `victory play` is how the game is started, so this change is no longer needed. AI Assisted

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!4719
No description provided.