Skip to content

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

Closed
SlopComp wants to merge 1 commit into
fxceless:mainfrom
SlopComp:texture-hot
Closed

SlopComp wants to merge 1 commit into
fxceless:mainfrom
SlopComp:texture-hot

Conversation

@SlopComp

Copy link
Copy Markdown

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.

…hange behind the guard

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.
@arminkhaleghirod

Copy link
Copy Markdown

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.

@oz-stanislav-zhukov

oz-stanislav-zhukov commented Nov 24, 2026 •

Copy link
Copy Markdown

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).

Hardware report for this machine: #148

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants