Fix stale frames in the opening video #489

Open
ballade0d wants to merge 1 commit from upstream-pr/489 into main
ballade0d commented 2026-11-25 01:28:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ballade0d on 2026-11-25T01:28:07Z.


Summary

The opening video can replay three stale frames in rotation. The decoder's sampled planes are single-layer, single-mip linear R8_UNORM textures. Writes through a different view of the same pages could escape the guards on the sampled view. The existing periodic hash then leaves those planes stale between checks.

For textures with that layout, use the existing content hash whenever the normal write-watch path is unavailable. The hash still gates detiling and upload.

Verification

  • With default settings on c96b4f2, frames 300–305 repeated A, B, C, A, B, C. Frames 300–317 and 364–369 contained 8 distinct frame hashes among 24 captures.
  • Applying this patch to the same revision produced 24 distinct hashes at the same capture points with default settings. Disabling VICTORY_TEXTURE_GUARD also cleared the loop on the original checkout.
  • The original patched checkout passed the two existing texture:: unit tests and a release startup smoke test.

The format and layout rule can also match non-video textures. Gameplay texture refresh cost and an automated alias-write regression still need validation.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6595008637 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/489). Originally posted by [ballade0d](https://github.com/ballade0d) on 2026-11-25T01:28:07Z. --- ## Summary The opening video can replay three stale frames in rotation. The decoder's sampled planes are single-layer, single-mip linear `R8_UNORM` textures. Writes through a different view of the same pages could escape the guards on the sampled view. The existing periodic hash then leaves those planes stale between checks. For textures with that layout, use the existing content hash whenever the normal write-watch path is unavailable. The hash still gates detiling and upload. ## Verification - With default settings on `c96b4f2`, frames 300–305 repeated A, B, C, A, B, C. Frames 300–317 and 364–369 contained 8 distinct frame hashes among 24 captures. - Applying this patch to the same revision produced 24 distinct hashes at the same capture points with default settings. Disabling `VICTORY_TEXTURE_GUARD` also cleared the loop on the original checkout. - The original patched checkout passed the two existing `texture::` unit tests and a release startup smoke test. The format and layout rule can also match non-video textures. Gameplay texture refresh cost and an automated alias-write regression still need validation.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/489:upstream-pr/489'
git switch 'upstream-pr/489'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/489'
git switch 'upstream-pr/489'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/489'
git switch 'upstream-pr/489'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/489'
git switch 'main'
git merge --squash 'upstream-pr/489'
git switch 'main'
git merge --ff-only 'upstream-pr/489'
git switch 'main'
git merge 'upstream-pr/489'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
fxceless/victory-fork!489
No description provided.