Streaming, copy queue, texture pools and a shader cache that survives rebuilds

Textures and staging cut from 64 MB blocks; a kept view per page section and
page lists read again until the title has filled them in; the GPU side told
when streamed bytes land; results fetched over the copy queue
(VICTORY_RELAY_COPY=1); the write-watch journal behind a reader-writer lock;
the shader cache keyed by the translator's sources and `victory shaders`;
helper lanes as in upstream 1733 (VICTORY_HELPER_OWN).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-24 18:55:40 -06:00
1 parent 7f166af4f3
commit 9fea7434cd
20 files changed
+1629 -232

No files matched your search

+11 -1
View File
@@ -607,7 +607,9 @@ pub(crate) fn save(now: bool) {
size
}
};
let used: Vec<String> = USED.lock().unwrap_or_else(|e| e.into_inner()).iter().flatten().cloned().collect();
// Through `used`: a process that asked for none yet (`victory shaders`)
// must not write the earlier runs' list over with nothing.
let used: Vec<String> = used().iter().flatten().cloned().collect();
let library_written = if bytes > 0 { replace_library(dir, &tmp) } else { Ok(()) };
if bytes > 0 && library_written.is_ok() {
// In place unless the system refused and the new one waits beside it.
@@ -694,7 +696,15 @@ fn used() -> std::sync::MutexGuard<'static, Option<HashSet<String>>> {
}
/// Whether the title pipeline with `key` was requested in this or an earlier run.
///
/// `VICTORY_EARLY_ALL=1`: every title pipeline is started at creation,
/// requested before or not, so that the driver's own cache holds it for
/// later runs.
pub(crate) fn wanted_early(key: &str) -> bool {
static ALL: OnceLock<bool> = OnceLock::new();
if *ALL.get_or_init(|| std::env::var_os("VICTORY_EARLY_ALL").is_some_and(|v| v == "1")) {
return true;
}
used().as_ref().is_some_and(|s| s.contains(key))
}