Water light on, PS4 pads, F1 menu saves at once, long-session memory, memory switches

Rendering and memory (GPL-3.0 code ported in; credits in the source):
- Water: 64-lane compute programs on 32-lane waves keep each wave
  together through loops and set up shared memory from the first
  thread, so the water's tiled light no longer leaves dark blocks. It
  runs by default now (VICTORY_WATER_LIGHT=0 leaves it out; an empty
  value, an earlier version's saved OFF, runs it). Also cloud tiles and
  the screen probes' ray activation.
- Placed views: their padding cleared as before; folding a buffer
  view's first element into its address is VICTORY_PLACED_FOLD=1, off:
  with it on, clothing and caps swapped to other variants for single
  frames in the boat cutscene.
- Texture sweep: textures whose copy was let go leave the looks until
  used again. Static samplers made first, in one order. Small buffers
  made ahead of the first 3D frame.
- play mode: VICTORY_TEXSPK_PASS_MS=8, VICTORY_PASSES_HOT=1,
  VICTORY_HELPER_PRIORITY=1.
- Memory switches, all off: VICTORY_SLOT_EVICT, VICTORY_ALLOCATOR_TRIM,
  VICTORY_BUDGET_PACK (and VICTORY_LIST_POOL_IDLE_S).

Input: DualShock 4 (0x05C4, 0x09CC, 0x0BA0 adapter) read over HID, USB
and Bluetooth, beside the DualSense; PlayStation pads rumble, and stop
when the game ends (issue #352).

F1 menu: every change is saved at once; it saves to
victory-settings.txt in VICTORY_HOME or %LOCALAPPDATA%\victory however
the game was started (no more "NO SETTINGS FILE").

Warm-up start: its 30 s count from the first frame of 100 draws or
more, not from the start: waiting at the title screen restarted it too
early and the next run still sat at 14 fps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
trustno1-coderandClaude Opus 5.5 committed 2026-11-27 15:03:27 -08:00
1 parent df2daafeb1
commit 64d4931b3d
44 files changed
+4664 -952

No files matched your search

+24 -1
View File
@@ -437,6 +437,11 @@ pub struct Structured {
/// Blocks whose closing branch the whole wave takes together ([`structure_wide`]): its
/// `when` is still the lane's own bit; the wave goes by all of them.
pub wide: HashSet<usize>,
/// Those of [`Self::wide`] that each host wave decides for itself, from its own lanes
/// ([`structure_wide_host`]): the branches that close or leave a loop. Two host waves of
/// one console wave may then go different ways, so their blocks are not ones every lane
/// of the console wave runs.
pub host_wide: HashSet<usize>,
/// Per block closed by a branch on a lane mask: whether the console takes it when some
/// lane's `when` holds (`true`) or when every lane's does (`false`).
pub wave_any: Vec<Option<bool>>,
@@ -469,8 +474,22 @@ pub fn structure(program: &Program) -> Result<Structured, ShaderError> {
/// run as two host waves, which exchange that decision and can then meet (a group barrier)
/// inside the branch.
pub fn structure_wide(program: &Program, wide: &HashSet<usize>) -> Result<Structured, ShaderError> {
structure_wide_host(program, wide, &HashSet::new())
}
/// [`structure_wide`], with the branches of `host` taken together too, but by each host wave
/// on its own ([`Structured::host_wide`]). For the branches that close or leave a loop a lane
/// would otherwise leave when its own bit says so: a host whose lanes do not come together
/// again behind such a loop (NVIDIA: lanes that left early run on in a wave of their own)
/// would give the cross-lane code behind it a part of the wave.
pub fn structure_wide_host(
program: &Program,
wide: &HashSet<usize>,
host: &HashSet<usize>,
) -> Result<Structured, ShaderError> {
let mut l = Lanes::new(program)?;
l.wide = wide.clone();
l.wide = wide.union(host).copied().collect();
l.host = host.difference(wide).copied().collect();
loop {
let execs = l.masks_in_order();
let cond = l.paths()?;
@@ -532,6 +551,8 @@ struct Lanes<'a> {
active: HashSet<Value>,
/// See [`Structured::wide`].
wide: HashSet<usize>,
/// See [`Structured::host_wide`].
host: HashSet<usize>,
/// SCC values of [`Self::scc_lane`] that are set when EVERY lane's bit is (`s_cmp_eq` of
/// two masks: "no lane differs"); the others are set when some lane's is.
scc_every: HashSet<Value>,
@@ -615,6 +636,7 @@ impl<'a> Lanes<'a> {
when: vec![None; blocks.len()],
active: HashSet::new(),
wide: HashSet::new(),
host: HashSet::new(),
scc_every: HashSet::new(),
wave_any: vec![None; blocks.len()],
})
@@ -860,6 +882,7 @@ impl<'a> Lanes<'a> {
paired_masks: if self.p.wave64 { self.masks } else { Map::default() },
active: self.active,
wide: self.wide,
host_wide: self.host,
wave_any: self.wave_any,
scc_some: self
.scc_lane