loader/gpu: port VICTORY_OUTPUT resolution patch, F1 output option, and ask_ahead kept early-out
This commit is contained in:
1 parent
c9067a7d3f
commit
84b4509fa3
6 files changed
+451
-6
No files matched your search
@@ -8998,7 +8998,7 @@ impl Batch {
|
||||
spans.retain(|(shadow, from, to)| !shadow.nothing_new(*from, *to - *from));
|
||||
FLUSHES[2].fetch_add((all - spans.len()) as u64, Ordering::Relaxed);
|
||||
}
|
||||
let ahead = spans.len() > 1;
|
||||
let ahead = spans.len() > 1 && !crate::watch::kept_active();
|
||||
if ahead {
|
||||
let ranges: Vec<(usize, usize)> = spans.iter().filter(|r| r.0.asked_ahead()).map(|r| (r.1, r.2)).collect();
|
||||
crate::watch::ask_ahead(&ranges);
|
||||
|
||||
@@ -173,6 +173,7 @@ const ITEMS: &[Item] = &[
|
||||
// On unless "0": a file saved by an earlier version holds an empty value (its OFF) or "1",
|
||||
// and both start it on, so nobody keeps it off from before by accident (2026-11-27).
|
||||
Item { var: "VICTORY_WATER_LIGHT", label: "WATER LIGHT", values: &[("", "ON"), ("0", "OFF")], live: false },
|
||||
Item { var: "VICTORY_OUTPUT", label: "OUTPUT SIZE (WINDOW)", values: &[("", "1080P (DEFAULT)"), ("1664x936", "936P"), ("1280x720", "720P (FASTEST)")], live: false },
|
||||
Item { var: "VICTORY_TEXTURE_DROP_MIPS", label: "TEXTURE SCALE (VRAM)", values: &[("", "FULL"), ("1", "HALF (6GB GPU)"), ("2", "QUARTER (4GB GPU)")], live: false },
|
||||
Item { var: "VICTORY_LEAVE_OUT", label: "HEAT HAZE AND DECAL DEFRAG", values: &[("02384a60fda6f2d0,731a39171b568298", "LEFT OUT"), ("", "RUN (SLOWER, SMEARS)")], live: false },
|
||||
Item { var: "VICTORY_EARLY_DEPTH", label: "EARLY DEPTH TEST", values: ON_UNSET, live: false },
|
||||
|
||||
@@ -322,10 +322,21 @@ const AHEAD_MAX: usize = (1 << 30) / PAGE;
|
||||
/// Asks the kernel about many ranges `(start, end)` at once, before the
|
||||
/// [`writes`] of each: ranges close together are one asking, and `writes`
|
||||
/// then answers from the journal until [`ask_ahead_done`]. The world's
|
||||
/// Whether the submission's one-shot asking (`ask_once`) already covers
|
||||
/// write-watch queries, so per-flush `ask_ahead` calls are no-ops.
|
||||
pub(crate) fn kept_active() -> bool {
|
||||
journal().kept
|
||||
}
|
||||
|
||||
/// submissions refresh thousands of host copies (6,664 askings a frame,
|
||||
/// 456 ms, in run 14). Ranges that are not write-watched, or lie alone, are
|
||||
/// left to `writes`.
|
||||
pub(crate) fn ask_ahead(ranges: &[(usize, usize)]) {
|
||||
// The submission's one asking stands ([`ask_once`]): check before
|
||||
// allocating, filtering, or sorting thousands of ranges.
|
||||
if journal().kept {
|
||||
return;
|
||||
}
|
||||
let mut pieces: Vec<(usize, usize)> = ranges
|
||||
.iter()
|
||||
// Not view memory known by its bits: the kernel would refuse the
|
||||
@@ -337,11 +348,6 @@ pub(crate) fn ask_ahead(ranges: &[(usize, usize)]) {
|
||||
return;
|
||||
}
|
||||
pieces.sort_unstable();
|
||||
// The submission's one asking stands ([`ask_once`]): what it does not
|
||||
// hold is left to `writes`.
|
||||
if journal().kept {
|
||||
return;
|
||||
}
|
||||
let _all = Asking::hold_all();
|
||||
let (mut asked, mut written) = (Vec::new(), Vec::new());
|
||||
let mut i = 0;
|
||||
|
||||
Reference in new issue
Block a user