The opening video plays frame by frame: textures the guards cannot see change are hashed at every check, and frames get their statistics #602
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!602
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-602"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@lukkasremondi on GitHub · 2026-11-25 02:57 UTC · original
lukkasremondi:intro-video-textures→main· +169 −10 · 3 files · 2 commits · openThe Rockstar intro video played at 30 fps but stuttered, going back and forth. Fifty consecutive presented frames (300–349, saved with
VICTORY_CAPTURE_FRAMESon a diagnostics build and hashed) cycled through three pictures, A B C A B C …, and one of the three was replaced by a new picture every eight frames: the title keeps three video frames in turn, and each reached the card eight frames late.Why. The video's planes are placed textures in view memory that the title writes through another view, so the read-only guards never see a write to them. Such a texture is then hashed on its turn only, every eighth frame (
HASH_EVERY, the textures taking turns to keep the cost down). Diagnostics in the video show it:textures 0.0 MB watched and changed, 1.6 MB hashed, 1.6 MB of them changedper frame, i.e. every hash of these textures finds them changed.What changes
crates/victory-gpu/src/texture.rs: a texture whose hash found it changed is hashed at the next check too, and so on while it keeps changing (Last::changing,hash_due); once a hash finds it unchanged it is back to its turn. Textures that do not change cost what they did; the video's three planes come up every frame (their hashing was already paid, in turns). Unit testhash_due_tests.crates/victory-gpu/src/frame.rs,queue.rs:GetFrameStatisticsXanswers. The title asks after every present when the frame began and when it was flipped (kind=0x11100, room for 6 records); the clock said "no statistics" every time. It now keeps the last sixteen tokens' origin (when the origin wait handed the token out) and flip (thePresentXnaming it), as the performance counter reads, and answers one record{ u32 kind; …; i64 origin @0x10; i64 flip @0x18 }for a flipped frame,E_FAILwith none for a frame not flipped,E_INVALIDARGwith no room. This alone did not change the video (measured: same cycle with it), but it is what the console gives the title; the record layout is as other layers report it. Unit test inframe::tests.Tested — Windows 10 22H2 (19045), NVIDIA GeForce RTX 3080 10 GB, AMD Ryzen 5 1600, 16 GB; release and
--profile diagbuilds, on2119b0eplus upstream Marvisak/VIctory#175 for the Agility SDK (as PR #22 does); the branch is rebased ona803c87;VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024, no relay.cargo test -p victory-gpu --lib -- frame::tests hash_due_tests: 3 passed.No game files, images or dumps are included. AI-assisted: Claude Code with Claude Fable 5.1 wrote the analysis scripts, the change and this description; the runs and the visual confirmation are mine.
🤖 Generated with Claude Code
The title asks after every present when the frame it presented began and when it was flipped; the clock answered "no statistics" every time. The opening video then showed three frames in turn, each kept for eight frames (captured frames 300-329 cycled through three images, one of them replaced every eight frames): the player seems to release a video buffer only once its frame is reported flipped, or after a time-out. The clock now keeps the last sixteen tokens' origins (taken when the origin wait hands the token out) and flips (taken at the PresentX that names the token), as the performance counter reads, and answers one record `{ kind; ...; origin @0x10; flip @0x18 }` for a flipped frame, E_FAIL with no record for one not flipped yet, E_INVALIDARG with no room. The record's layout is the console's, as other layers report it. Co-Authored-By: Claude Fable 5.1 <[email protected]>@LeonardoS11 on GitHub · 2026-11-25 03:21 UTC · original
Tried on an RTX 3080 Ti, where the opening video had the same back-and-forth.
diagbuild withdiagnostics;mainatc96b4f2with this PR's two commits cherry-picked (no conflict), no environment switches — so withmain's current defaults (the copy-back thread and late wait on), not the no-relay setup of the description.cargo test -p victory-gpu --lib -- frame::tests hash_due_tests: 3 passed.Not checked: which scenes are left and whether they go with
main's new defaults (the present as a flight) rather than with the texture hashing — I can run it again withVICTORY_RELAY=0and with captured frames hashed the way the description did, if that helps.(Run and the observation by me on the hardware above; this note written with Claude Code.)
@LeonardoS11 on GitHub · 2026-11-25 04:34 UTC · original
Follow-up on the same RTX 3080 Ti, now on top of
mainat310c6eb.310c6ebwith this PR's two commits (in a branch that also carries #186 and some opt-in diagnostics of ours, all off; no environment switches): the opening video played through in order, start to end. No scene went back and forth.310c6eb, same machine, same night, run right after: the video goes back and forth again.So here the fix is this PR, not something that came with the newer
main, and the "few scenes left" I reported onc96b4f2are gone on this base. One run each, judged by eye.(Runs and the observation by me on the hardware above; this note written with Claude Code.)
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.