Textures picked by index: the recheck's fingerprint reads every mip of every slice #559
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!559
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-559"
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?
@NickJBc on GitHub · 2026-11-25 02:14 UTC · original
NickJBc:recheck-every-mip→main· +202 −24 · 4 files · 1 commits · openFollow-up to the known gap in
a803c87("the fingerprint samples the start, middle and end of the memory, so a texture whose other parts arrive later is still missed").The gap
The recheck compares a fingerprint of 16 KiB at the start, middle and end of a texture's memory. Each slice stores its mips smallest first, with mip 0 last, so:
A mip or slice that arrives after the upload in one of those places is still missed.
The change
Layout::sample_ranges(victory-formats): one range at the start of each mip of each slice, with tail mips at their places in the tail block. Each range is 1 KiB, at most 64 per texture, spread evenly over slices and mips when there are more. Adjacent ranges are joined into one read.Waiting::mips). They're read on top of the three existing windows, so the new fingerprint sees every change the old one saw.VICTORY_HEAP_RECHECK_MIPS=0reads the three windows alone, and the fingerprint is then identical to before.Windows go at a mip's start, not its centre, because a tail mip may fill only the first part of its place in the tail block. A centred window missed mip 5 of a 2048² BC texture in the test below.
Checked
Layout::offset, not through the mip offsetssample_rangesuses. The cases cover 2D BC and RGBA, cube, array, linear and a 4096×64 texture.diagnostics.Not checked
Not run in the game yet, so it is unknown how many more stale textures this catches. The
changed after its uploadwarning count, with and withoutVICTORY_HEAP_RECHECK_MIPS=0, would show it.#555 also touches
descriptor/host.rsandtexture.rs(view-memory guards, a different path); they may need a small rebase against each other.@Victorywillbeours222 on GitHub · 2026-11-25 13:44 UTC · original
A count of the gap this PR describes, from the game.
RTX 5080 16 GB, Ryzen 7 5800X, diag build of
f85101bwith its frame-rate switches, Series S profile. Two 10-minute runs through the prologue (the diner, the title card, the cell).We read the textures picked by index whole as well (up to 8 MiB) at each recheck. We counted a change as "only between the windows" when the three 16 KiB windows matched but the whole did not:
f85101b+ the switchesVICTORY_SKIP_WC_COMPARE=1The change we measured with is #956: a whole read up to a set size, and rechecks that go on past the fifth. It is meant to sit beside this PR, not replace it: your per-mip ranges for big textures, a whole read for small atlases. We're happy to rebase it onto this one if it goes in first.
Numbers only; no captures.
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.