Textures: hash guarded textures at every check while they are new or changing behind the guard #58

Closed
github-bot wants to merge 1 commit from gh-pr/58/head into gh-pr/58/base
Owner

@⁠SlopComp on GitHub · 2026-11-24 21:00 UTC · original
SlopComp:texture-hot → main · +56 −4 · 2 files · 1 commits · closed without merging

The opening star screen, the logo video and the loading animation flickered: the title writes these textures in a way the texture guard doesn't catch, so changes were only picked up by the every-8th-frame hash and older pictures kept showing.

A guarded texture is now hashed at every check for its first 64 frames, and for another 64 each time the hash finds a change the guard missed. Textures that don't change go back to the 8-frame hash. VICTORY_TEXTURE_HOT=0 turns it off.

Tested on an RTX 5080: the flicker is gone apart from a blink on the first frame.

**@⁠SlopComp** on GitHub · 2026-11-24 21:00 UTC · [original](https://github.com/fxceless/victory-fork/pull/58) `SlopComp:texture-hot` → `main` · +56 −4 · 2 files · 1 commits · closed without merging The opening star screen, the logo video and the loading animation flickered: the title writes these textures in a way the texture guard doesn't catch, so changes were only picked up by the every-8th-frame hash and older pictures kept showing. A guarded texture is now hashed at every check for its first 64 frames, and for another 64 each time the hash finds a change the guard missed. Textures that don't change go back to the 8-frame hash. `VICTORY_TEXTURE_HOT=0` turns it off. Tested on an RTX 5080: the flicker is gone apart from a blink on the first frame.
The guard on view memory sees no write made through another view of the
same pages; such a change was found only by the hash every eighth frame.
The boot logo video and the loading animation write their textures that
way every frame (a ring of three): each showed up to eight frames late
and in turns, so the presented picture cycled through three, a new one
every eight frames, and flickered. The six-star screen of the first
seconds changed before the hash ever caught it.

A guarded texture is now hashed at every check for its first 64 frames,
and for 64 frames after each change the guard missed; textures that stay
unchanged go back to every eighth frame.
VICTORY_TEXTURE_HOT=0: every eighth frame only, as before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:20 +00:00
github-bot closed this pull request 2026-11-26 03:35:20 +00:00
Author
Owner

@⁠arminkhaleghirod on GitHub · 2026-11-24 21:37 UTC · original

Tested c5b12f1 on an RTX 4080 (Windows 11, Series X, default settings). I saved every frame of the startup animation (550 to 1000) and counted frames that jump back (n and n+2 match, n+1 doesn't):

Build Moving frames Jumps back
main 90228a7 25 13
main, VICTORY_TEXTURE_GUARD=0 29 0
this PR 33 0

Fixes #39 here too. I'm closing my #63 (same idea) in favour of this one.

**@⁠arminkhaleghirod** on GitHub · 2026-11-24 21:37 UTC · [original](https://github.com/fxceless/victory-fork/pull/58#issuecomment-7145171342) Tested c5b12f1 on an RTX 4080 (Windows 11, Series X, default settings). I saved every frame of the startup animation (550 to 1000) and counted frames that jump back (n and n+2 match, n+1 doesn't): | Build | Moving frames | Jumps back | |---|---|---| | main 90228a7 | 25 | 13 | | main, `VICTORY_TEXTURE_GUARD=0` | 29 | 0 | | this PR | 33 | 0 | Fixes #39 here too. I'm closing my #63 (same idea) in favour of this one.
Author
Owner

@⁠oz-stanislav-zhukov on GitHub · 2026-11-24 22:05 UTC · original · edited 2026-11-24 23:31 UTC

Confirmed on Windows 10 Pro 22H2 (19045), RTX 5060 Ti 16 GB (driver 621.24), i7-14700KF, 64 GB, Series X profile, release build.

Tree: main (4e17478) + #22 + this PR (c5b12f1), merged locally without conflicts. Speed switches on (VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024).

  • Before: the intro / logo video visibly jumped back and forth (as in #39), in every run.
  • With this PR: it plays smoothly. Checked by eye only (no frame captures, release build).
  • cargo test -p victory-gpu: 110 passed, 0 failed, 1 ignored.

Hardware report for this machine: #148

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠oz-stanislav-zhukov** on GitHub · 2026-11-24 22:05 UTC · [original](https://github.com/fxceless/victory-fork/pull/58#issuecomment-7145798979) · edited 2026-11-24 23:31 UTC Confirmed on **Windows 10 Pro 22H2 (19045)**, **RTX 5060 Ti 16 GB** (driver 621.24), i7-14700KF, 64 GB, Series X profile, release build. Tree: `main` (`4e17478`) + #22 + this PR (`c5b12f1`), merged locally without conflicts. Speed switches on (`VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024`). - Before: the intro / logo video visibly jumped back and forth (as in #39), in every run. - With this PR: it plays smoothly. Checked by eye only (no frame captures, release build). - `cargo test -p victory-gpu`: 110 passed, 0 failed, 1 ignored. Hardware report for this machine: #148 AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.