Texture uploads wait for no mapping, ask no guards and hash cheaply; the sweep looks at a part; bakes pass once for what is new

A bake's uploads waited for the lock the runtime holds while it remaps, and a staging buffer a draw kept waited at every later
refresh (29 to 239 ms a frame, all threads, run n04): gone, a read through the kernel gets every page. A staging buffer made for
one upload asks neither the write watch nor the guards (VICTORY_TEXTURE_ONCE=0: as before). blake3 makes way for a 128-bit digest
(0.035 against 0.2 ms a megabyte). While textures are kept for minutes the sweep looks at 8,192 a time (VICTORY_TEXTURE_SWEEP=whole).
The pass before a bake is made again only for something new.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 05:14:38 -06:00
1 parent 917e1a7103
commit 2dfba4dbd8
5 files changed
+215 -38

No files matched your search

+8 -2
View File
@@ -7531,11 +7531,17 @@ impl Meter {
"textures from the first level viewed (VICTORY_HELD_LEVELS=0: whole), since the start: {copies} host copies of the \
levels viewed alone ({} MB on the card, {} MB of title memory whole), {grown} replaced by one with more levels, \
{flipped} slots made from their new view after its upload had run ({missed} written again first); {} uploads left \
out as the host copy held those bytes (VICTORY_TEXTURE_SAME=0: made); {} MB of texture blocks free",
out as the host copy held those bytes (VICTORY_TEXTURE_SAME=0: made); {} MB of texture blocks free; \
{} looks for textures to let go, {:.2} ms each, the longest {:.1}",
bytes >> 20,
whole >> 20,
crate::draw::HEAP_TEXTURES_SAME.load(Ordering::Relaxed),
crate::pool::texture_room() >> 20
crate::pool::texture_room() >> 20,
crate::resource::SWEPT_US[0].load(Ordering::Relaxed),
crate::resource::SWEPT_US[1].load(Ordering::Relaxed) as f64
/ 1e3
/ crate::resource::SWEPT_US[0].load(Ordering::Relaxed).max(1) as f64,
crate::resource::SWEPT_US[2].load(Ordering::Relaxed) as f64 / 1e3
);
}
{