Repository navigation
Conversation
…f every slice The recheck added in a803c87 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 for a plain 2D texture those windows land on the tail and mip 0 only: mips 1 and 2 (about a quarter of the bytes) and every mip in between are never read. In an array or cube map they see two slices of six or more. A mip or slice that arrived after the upload there was still missed (the commit's own "known gap"). Layout::sample_ranges (victory-formats) gives one range at the start of each mip of each slice, tail mips at their places in the tail block: 1 KiB each, at most 64 per texture, spread evenly over slices and mips when there are more, adjacent ranges joined into one read. The ranges are worked out from the staging buffer's layout at upload, kept with the slot, and read on top of the three windows, so the new fingerprint sees every change the old one saw. A 4096-square texture with all its mips: 10 reads, 12 KiB more per look; a 512 cube map with 10 mips: 40 reads, 52 KiB. VICTORY_HEAP_RECHECK_MIPS=0 keeps the three windows alone (the fingerprint is then the same as before). Checked: victory-formats tests on Linux, including a test that every mip of every slice (tail mips too) has a range over bytes its elements are stored at, found through Layout::offset rather than the mip offsets; the Windows target builds and passes clippy with and without diagnostics. Not yet run in the game. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YYNyBknqrxMVw1v7HYK6J4
This was referenced Nov 25, 2026
ExoCalibra
added a commit
to ExoCalibra/victory-exo
that referenced
this pull request
Nov 25, 2026
ExoCalibra
added a commit
to ExoCalibra/victory-exo
that referenced
this pull request
Nov 25, 2026
ExoCalibra
added a commit
to ExoCalibra/victory-exo
that referenced
this pull request
Nov 25, 2026
…fxceless#559, and upstream fxceless#863 boat buoyancy note to README
|
A count of the gap this PR describes, from the game. RTX 5080 16 GB, Ryzen 7 5800X, diag build of 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:
The 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. |
CernyMuzCZ
pushed a commit
to CernyMuzCZ/vitezstvi-fork
that referenced
this pull request
Nov 25, 2026
…ip of every slice, preserving fxceless#956)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-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.