Take the test/fx-prs branch of asdaasdsaddf's fork (as one commit)

Double-precision shader instructions (v_cvt_f32_f64, v_add_f64 sums, the
makeDouble overload name and flag), a first half of a paired interpolation
read as data, sooner eviction of idle textures and caches under memory
pressure, a retried DirectStorage destination write, the texture catch-up
budget, VICTORY_FIRSTLANE_OWN, and zlib-rs in place of miniz_oxide.

Left out: the fork's personal launcher scripts and its readme.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
fxcelessandClaude Fable 5.2 committed 2026-11-24 19:00:31 -05:00
1 parent 43ebd22d7d
commit a56ad16e30
22 files changed
+1147 -64

No files matched your search

+17 -3
View File
@@ -1446,7 +1446,12 @@ impl State {
return;
}
/// Bytes of texture memory staged per frame.
const PER_FRAME: u64 = 192 << 20;
// `VICTORY_TEXTURE_STAGE_MB` raises it: a backlog of tens of thousands of
// textures (a scene's first minutes) then drains in fewer frames.
static PER_FRAME_MB: std::sync::OnceLock<u64> = std::sync::OnceLock::new();
let per_frame: u64 = *PER_FRAME_MB.get_or_init(|| {
std::env::var("VICTORY_TEXTURE_STAGE_MB").ok().and_then(|v| v.trim().parse().ok()).unwrap_or(192)
}) << 20;
static FRAME: AtomicU64 = AtomicU64::new(u64::MAX);
static SPENT: AtomicU64 = AtomicU64::new(0);
let frame = crate::frame::current();
@@ -1499,10 +1504,19 @@ impl State {
// records the frame, and making and staging 192 MB of textures took
// 1.6-2.2 s of each of the world's first twenty frames (run 20).
// The rest waits for the next frames, as it does past the bytes.
const SPAN: std::time::Duration = std::time::Duration::from_millis(250);
static SPAN_MS: std::sync::OnceLock<u64> = std::sync::OnceLock::new();
let span = std::time::Duration::from_millis(*SPAN_MS.get_or_init(|| {
std::env::var("VICTORY_TEXTURE_STAGE_MS").ok().and_then(|v| v.trim().parse().ok()).unwrap_or(250)
}));
// A backlog (a scene's first minutes: 22,000 slots due, 2-3 minutes of black
// surfaces at 192 MB a frame) gets three times the bytes and the time until it
// drains; `VICTORY_TEXTURE_CATCHUP=0` keeps the plain budget.
static CATCHUP: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
let catchup = *CATCHUP.get_or_init(|| std::env::var_os("VICTORY_TEXTURE_CATCHUP").is_none_or(|v| v != "0"));
let (per_frame, span) = if catchup && due.len() >= 1024 { (per_frame * 3, span * 3) } else { (per_frame, span) };
let began = std::time::Instant::now();
for (index, write) in due {
if SPENT.load(Ordering::Relaxed) >= PER_FRAME || began.elapsed() > SPAN {
if SPENT.load(Ordering::Relaxed) >= per_frame || began.elapsed() > span {
break;
}
// A placed texture whose memory is not mapped (not streamed in