Textures picked by index: keep looking at the ones the title paints through another view (VICTORY_PAINTED_EVERY) #1573

Manually merged
github merged 3 commits from github-bot/gh-1573 into main 2026-11-29 08:21:30 +00:00 AGit
Owner

@⁠lexical-scope on GitHub · 2026-11-28 21:52 UTC · original
lexical-scope:pr-painted-textures → main · +77 −4 · 2 files · 3 commits · merged 2026-11-29 08:16 UTC

Textures picked by index: keep looking at the ones the title paints through another view (VICTORY_PAINTED_EVERY=<frames>, off by default)

What

Some textures picked by index are repainted by the title through another view of their pages: their memory is mapped at other addresses too, and the title writes it there. Nothing tells us of such a write (no descriptor write, no runtime call), so the only thing that finds it is the recheck look (RECHECK_FRAMES). After a look finds such a change, the slot is looked at again the next frame, then 12, 40, 120 and 400 frames on, and never again after the fifth look finds it unchanged. Between looks the texture is shown as it was, up to 40 frames before, and after the last look until its slot is written again.

With VICTORY_PAINTED_EVERY=<frames> (at most 120):

  1. A slot a look found changed this way is looked at every <frames> frames, with no end (its look count is set to PAINTED, u8::MAX).
  2. The start addresses of such textures are kept (at most 4096; the set is cleared when full). An upload of memory at one of them starts at that pace under whatever slot, so a slot written again does not fall back to RECHECK_FRAMES.

Unset or 0: unchanged. A look reads 48 KiB.

In the F1 menu it is REPAINTED TEXTURES (beside TEXTURE NO WAIT): OFF, EVERY FRAME (1), EVERY 4 FRAMES (4). OFF comes first, as the launcher starts; it takes effect at the next start.

Why

RTX 3080 Ti, Windows 11, Series S profile, -Dlss off, diagnostics build, from the log's a texture picked by index changed after its upload with nothing to tell of it warnings:

  • Before: all 191 warnings of a run were 6 slots of 172 or 344 KiB, and every one had blocks_shown_elsewhere ≥ 1. The changes were found 13 and 53 frames after the upload (median 53), on the schedule's looks: 1 + 12, 1 + 12 + 40.
  • With (1): 46% of the changes found were found at the fast pace. The rest were first catches of a slot on the old schedule, some 56 and 176 frames late after the slot had been written again.
  • With (1) and (2): 53% (88 of 165) at the fast pace, against 7 of 58 in the run just before it with (1) alone (another route); those left were first catches 4 or 16 frames after their upload.

Frame times did not change measurably at the same draw counts. In play, specular and the textures that used to lag looked better.

Tests

  • cargo clippy -p victory-gpu --all-targets --locked, with and without --all-features: no warnings in draw.rs or host/menu.rs.
  • cargo test -p victory-gpu --lib --locked: 550 passed, the menu's 8 among them (every line fits, every character has a picture).
  • cargo xtask policy fails on main already (crates/victory-shader/src/emit/lower.rs is over its size limit); nothing in this PR touches it.
  • Played on the branch above main 923e38cc for several runs with VICTORY_PAINTED_EVERY=1.

Not done

  • A texture repainted for the first time is still found on the old schedule; only what is found after that is faster.

🤖 Generated with Claude Code

**@⁠lexical-scope** on GitHub · 2026-11-28 21:52 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1573) `lexical-scope:pr-painted-textures` → `main` · +77 −4 · 2 files · 3 commits · merged 2026-11-29 08:16 UTC ## Textures picked by index: keep looking at the ones the title paints through another view (`VICTORY_PAINTED_EVERY=<frames>`, off by default) ### What Some textures picked by index are repainted by the title through **another view of their pages**: their memory is mapped at other addresses too, and the title writes it there. Nothing tells us of such a write (no descriptor write, no runtime call), so the only thing that finds it is the recheck look (`RECHECK_FRAMES`). After a look finds such a change, the slot is looked at again the next frame, then 12, 40, 120 and 400 frames on, and **never again** after the fifth look finds it unchanged. Between looks the texture is shown as it was, up to 40 frames before, and after the last look until its slot is written again. With `VICTORY_PAINTED_EVERY=<frames>` (at most 120): 1. A slot a look found changed this way is looked at every `<frames>` frames, with no end (its look count is set to `PAINTED`, `u8::MAX`). 2. The **start addresses** of such textures are kept (at most 4096; the set is cleared when full). An upload of memory at one of them starts at that pace under whatever slot, so a slot written again does not fall back to `RECHECK_FRAMES`. Unset or `0`: unchanged. A look reads 48 KiB. In the F1 menu it is **REPAINTED TEXTURES** (beside TEXTURE NO WAIT): OFF, EVERY FRAME (`1`), EVERY 4 FRAMES (`4`). OFF comes first, as the launcher starts; it takes effect at the next start. ### Why RTX 3080 Ti, Windows 11, Series S profile, `-Dlss off`, diagnostics build, from the log's `a texture picked by index changed after its upload with nothing to tell of it` warnings: - **Before:** all 191 warnings of a run were 6 slots of 172 or 344 KiB, and **every one had `blocks_shown_elsewhere` ≥ 1**. The changes were found 13 and 53 frames after the upload (median 53), on the schedule's looks: 1 + 12, 1 + 12 + 40. - **With (1):** 46% of the changes found were found at the fast pace. The rest were first catches of a slot on the old schedule, some 56 and 176 frames late after the slot had been written again. - **With (1) and (2):** 53% (88 of 165) at the fast pace, against 7 of 58 in the run just before it with (1) alone (another route); those left were first catches 4 or 16 frames after their upload. Frame times did not change measurably at the same draw counts. In play, specular and the textures that used to lag looked better. ### Tests - `cargo clippy -p victory-gpu --all-targets --locked`, with and without `--all-features`: no warnings in `draw.rs` or `host/menu.rs`. - `cargo test -p victory-gpu --lib --locked`: 550 passed, the menu's 8 among them (every line fits, every character has a picture). - `cargo xtask policy` fails on `main` already (`crates/victory-shader/src/emit/lower.rs` is over its size limit); nothing in this PR touches it. - Played on the branch above main `923e38cc` for several runs with `VICTORY_PAINTED_EVERY=1`. ### Not done - A texture repainted for the first time is still found on the old schedule; only what is found after that is faster. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
In a run on an RTX 3080 Ti (Series S, in the world) all 191 warnings of a
texture picked by index changed after its upload with nothing to tell of
it were six slots of 172 or 344 KiB whose blocks are shown at other
addresses too: textures the title paints through another view of their
pages. After such a change the slot was looked at the next frame, then 12,
40, 120 and 400 frames on (RECHECK_FRAMES), and never after the fifth look
found it as it was; the changes were found 13 and 53 frames after the
upload, the schedule's looks. Between looks the texture was shown as it
was up to 40 frames before.

With the switch, a slot a look found changed so is looked at again every
so many frames (at most 120), with no end, its look count set to PAINTED.
Off by default; a look reads 48 KiB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With VICTORY_PAINTED_EVERY the fast looks were the slot's: a slot written
again started over at RECHECK_FRAMES. In a run on an RTX 3080 Ti (Series
S, main 923e38cc) two such textures were found changed for the first time
176 and 56 frames after their upload, at the schedule's third and second
looks, and were shown as they were before until then. The start addresses
of textures a look found painted are kept now (at most 4096); an upload of
memory there starts at the fast pace, under whatever slot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The switch of the two commits before, in the menu beside TEXTURE NO WAIT.
Off first, as the launcher starts; read at the start, so not live.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 21:54:16 +00:00
github manually merged commit 241a536293 into main 2026-11-29 08:21:30 +00:00
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!1573
No description provided.