Publish the pareto-residency Windows build and portable launcher

This commit is contained in:
codec_d committed 2026-11-25 22:33:14 -08:00
1 parent efeef1d65b
commit 545f89019e
20 files changed
+1671 -217

No files matched your search

+27 -7
View File
@@ -91,6 +91,11 @@ pub(crate) struct Staging {
/// recorded again about a second later if the card has room by then
/// ([`upload`]).
waiting: std::sync::atomic::AtomicU64,
/// Recorded for a one-shot decoration bake (`BAKING`): submission-time
/// refresh must wait for title memory to stop remapping
/// (`title_memory_reading`) instead of taking `no_wait()` /
/// `refresh_unlocked()` or the 30-frame partial-read throttle.
exact: std::sync::atomic::AtomicBool,
}
/// What a texture's staging buffer holds: the hash of the memory detiled
@@ -756,6 +761,10 @@ pub(crate) fn upload_from(list: &HostList, resource: This, first: u32) {
return;
};
use std::sync::atomic::Ordering::Relaxed;
let baking = BAKING.get();
if baking {
staging.exact.store(true, Relaxed);
}
let picking = PICKING.get();
if picking.is_none() {
// A draw samples it through a table: kept and checked from here on.
@@ -810,8 +819,10 @@ pub(crate) fn upload_from(list: &HostList, resource: This, first: u32) {
// The host texture has the staging buffer's contents: only the check
// at submission is left, and what it finds changed the next list that
// samples the texture uploads (a frame late where every list of the
// frame was recorded before that check).
if staging.uploaded.load(Relaxed) && !staging.dirty.load(Relaxed) {
// frame was recorded before that check). During a one-shot bake we
// always record the copy so any change found at submission lands in
// VRAM before the bake draw executes.
if !baking && staging.uploaded.load(Relaxed) && !staging.dirty.load(Relaxed) {
#[cfg(feature = "diagnostics")]
crate::copystat::add(crate::copystat::C::TexSkipped, 1);
list.defer_texture(staging);
@@ -1254,12 +1265,13 @@ impl Staging {
let start = self.memory as usize;
let mut last = waited(0, || self.last.lock().unwrap_or_else(|e| e.into_inner()));
let last = &mut *last;
let exact = self.exact.swap(false, std::sync::atomic::Ordering::Relaxed);
let alone = self.once.load(std::sync::atomic::Ordering::Relaxed);
if alone && last.hash.is_some() {
if alone && !exact && last.hash.is_some() {
return 0;
}
if !alone && let Some((now, written)) = waited(1, || crate::watch::writes(start, start + size, false)) {
if last.asked != 0 && written.iter().all(|&(_, w)| w <= last.asked) {
if !exact && last.asked != 0 && written.iter().all(|&(_, w)| w <= last.asked) {
return 0;
}
last.asked = now;
@@ -1303,7 +1315,7 @@ impl Staging {
last.hot_until = frame + HOT_FRAMES;
}
let hot = hot_textures() && frame < last.hot_until;
if unwritten && !turn && !hot {
if !exact && unwritten && !turn && !hot {
return 0;
}
blind = unwritten;
@@ -1322,7 +1334,7 @@ impl Staging {
// stays mapped (see `crate::watch::title_memory_reading`; without
// it a page went between the asking and the read in runs 71 and
// 74).
let _mapped = if no_wait() {
let _mapped = if no_wait() && !exact {
// Not waited for: while the runtime remaps title memory the
// texture is read through the kernel instead, whole or not at
// all (`no_wait`).
@@ -1342,7 +1354,7 @@ impl Staging {
// unmapped pages is slow, and nothing tells us when pages
// arrive): a mip that streams in shows up to 30 frames late.
let frame = crate::frame::current();
if last.partial.is_some_and(|at| frame < at + 30) {
if !exact && last.partial.is_some_and(|at| frame < at + 30) {
return 0;
}
last.partial = Some(frame);
@@ -1878,6 +1890,13 @@ fn staging(resource: This, copy: &crate::resource::HostTexture, first: u32) -> O
let (piece, buffer, base, data) = match crate::pool::staging(host, total) {
Some((piece, buffer, base, data)) => (Some(piece), buffer, base, data),
None => {
let speculative = PICKING.get().is_some() && !BAKING.get();
if crate::residency::upload_refused()
|| (speculative && !crate::residency::allow_staging_growth(false))
{
crate::residency::note_staging_deferred();
return None;
}
let (buffer, data) = host.upload_buffer(total)?;
crate::host::name(&buffer, || {
format!(
@@ -1919,6 +1938,7 @@ fn staging(resource: This, copy: &crate::resource::HostTexture, first: u32) -> O
detiled: std::sync::atomic::AtomicU32::new(0),
judged: [const { std::sync::atomic::AtomicU64::new(0) }; 2],
waiting: std::sync::atomic::AtomicU64::new(0),
exact: std::sync::atomic::AtomicBool::new(BAKING.get()),
});
map.insert(resource as usize, s.clone());
Some(s)