Repository navigation
Launcher: shaders, warm and preload run on their own apply the defaults play applies - #1971
eleboucher wants to merge 4 commits into
Conversation
…remove racy state/remap elision - Revert D3D12 State root-argument / IA elision in draw.rs (trustno1-coder#1967): ExecuteIndirect, ambient SetDescriptorHeaps, gpudetile, inplace, and Streamline mutate the command list directly, causing skipped binds and wrong material/texture descriptor tables - Revert VICTORY_REMAP_SAME in xmem.rs, VICTORY_PLANE_SAME / shared_zeros in texture.rs, and VICTORY_SWEEP_ASYNC / RefreshSet in host.rs, memory.rs, and resource.rs so physical-page DirectStorage texture updates always invalidate GPU views and slot_evict never races with victory-submit - Fix 16 GB / 24 GB+ VRAM budget in adaptive.rs (TexPool 93% / 94%, peak-sized target reserve, VICTORY_WINDOWS_BAR_MB=512) so ~79k high-Mip world textures stay resident alongside DLSS Multi-Frame Generation without hitting premature no-room throttling - Retain pure verified fixes: slot_evict 3-lock deadlock fix (trustno1-coder#1969), sparse interior-page sweep_mapping check (trustno1-coder#1958), per-tier pool block sizing & CPU pool budgets (trustno1-coder#1968), O(log N) ahead binary search, single-range descriptor copy fast path, in-world Bink FG gate fix, simultaneous LT+RT mouse input fix (trustno1-coder#1949), VICTORY_KEEP_AWAKE, and standalone cache warm defaults (trustno1-coder#1971)
Held in the fork until upstream takes them; each switch keeps the old behaviour by default: - trustno1-coder#1937 the placed-texture span lock is skipped by default (VICTORY_SPANS_QUICK on), VICTORY_QUEUE_BATCH_MAX; - trustno1-coder#1556 no-op refreshes batched, the lock-free ask_once fast path, a binary search in Journal::ahead; - trustno1-coder#1561 less CPU lock contention in shadow merges, refreshes and card sync; - trustno1-coder#2049 the sparse copy_stale fast path, the Batch/card_steps hot caches, the RT reserve's settle-decay, the depth plan; - trustno1-coder#1971 the launcher's shader warm and preload runs apply what play applies; - trustno1-coder#1911 Series S keeps 1,536 MB for render targets, not 3,072; - trustno1-coder#1985 the XMA decoder thread runs at the helpers' priority (VICTORY_XMA_PRIORITY=-2..2); - trustno1-coder#1912 flights in the air are settled before a bake reads title memory (VICTORY_BAKE_SETTLE); - trustno1-coder#1274 room for a full-size 3840x2160 scene (VICTORY_NATIVE_4K, VICTORY_RT_HEAP_MB, VICTORY_SCENE_POOL).
|
This fixes a real problem. #3451 is full of people who ran One interaction to guard against: the script launcher. That's already the case on Suggestion: apply the defaults only when none of play's settings are in the environment. That is a command typed in a plain shell; the launcher, let (s, _) = settings(&Plain::parse_from(["play"]).play, &menu, None);
if s.keys().any(|k| std::env::var_os(k).is_some()) {
return; // started by play or a launcher: its switches stand
}With that, a hand-typed preload matches |
… environment (a launcher's own preload keeps its switch table)
|
Thanks, done as you suggested: |
| let Ok(home) = home() else { return }; | ||
| let menu = parse_menu(&std::fs::read_to_string(home.join("victory-settings.txt")).unwrap_or_default()); | ||
| let (s, _) = settings(&Plain::parse_from(["play"]).play, &menu, None); | ||
| if s.keys().any(|k| std::env::var_os(k).is_some()) { |
There was a problem hiding this comment.
#3884 reproduces on the exact release/main 41adb551. All four listed switches are present in play and in the cache-key path. I ran the production settings logic and shader_cache::translation() in separate Windows fixture processes. Play defaults Cache key inputs
| Scenario | Standalone preload key prefix | Matching play key prefix |
|---|---|---|
| Main, clean environment | 43ddf8eba9a8c027 |
01189934b9bc314f |
#1971 a6e5ddb, clean environment |
01189934b9bc314f |
01189934b9bc314f |
#1971, standalone shell with only VICTORY_EARLY_DEPTH=0 |
43ddf8eba9a8c027 |
125747ae336d4ee0 |
The last case exits here because one setting is present. The override survives, but NAN_SCRUB, SAMPLED_MARKS, and BVH_MISS remain unset. Its matching launch uses play --set VICTORY_EARLY_DEPTH=0 and has all three at 1.
I tested using the existing VICTORY_MENU_PLAY marker to recognize the two launchers' prepared environment, and filling only missing variables in a standalone shell. Clean preload still matches play. The single override now matches 125747ae336d4ee0. A launcher-marked child retains its deliberately partial table and the same key 8e34f419fb8fc944. The 28 existing play::tests passed. Script launcher marker
Could we use the launcher marker here, or have the existing launchers pass an explicit equivalent, so a standalone caller can keep one override and fill the remaining defaults? The fixture checked key equality. A gameplay preload run remains a separate check.
If you reuse this regression case or follow-up, please retain its authorship with Co-authored-by: andrewpozdnakov7-jpg <andrewpozdnakov7-jpg@users.noreply.github.com>.
There was a problem hiding this comment.
Thanks, that is the better rule; done in 8b5d771 following your suggestion (credit for the regression case and the marker idea is yours): apply_defaults returns when VICTORY_MENU_PLAY is set (play/F1 restart set it at play.rs:1149, play-foxhound.ps1 at line 310), and otherwise fills only the variables the shell did not set. So a clean standalone preload keys like play, a standalone shell with one override keeps it and gets the other defaults, and a launcher-marked child keeps its own table. victory clippy is clean here; I have not re-run your key fixture.
There was a problem hiding this comment.
Retested the exact updated head 8b5d771d on Windows. All five fixture processes produced the expected keys. Clean preload and play both used 01189934b9bc314f. With only VICTORY_EARLY_DEPTH=0, preload and the matching play launch both used 125747ae336d4ee0. The launcher-marked child kept its partial environment and 8e34f419fb8fc944.
This resolves the environment-override case I raised. Thanks for the update.
…; a plain shell fills only the defaults it did not set
…d preload run on their own apply the defaults play applies
|
Merged main (c71899d), no conflicts. Main already carries |
|
I reran the five Windows cache-key scenarios on release main
The remaining guard in this PR fixes the prepared-launcher case on release main. Standalone commands still fill in missing defaults and preserve explicit overrides. The scoped Windows test runs on the PR passed 29 launcher tests and 12 warm-up tests. |
Fixes #
What it changes
victory playputs its defaults table (SETTINGSinplay.rs) into the environment. Three of those defaults are part of the shader cache key inshader_cache.rsbuild():VICTORY_EARLY_DEPTH=1,VICTORY_NAN_SCRUB=1andVICTORY_BVH_MISS=1.victory shaders,victory warmandvictory preloadrun on their own did not apply them, so they translated and made pipelines under another key. A defaultplayafterwards missed every translation and the driver compiled again during the start; on a new translator that can last long enough for the title's 30 s hang watchdog (+0x23cf683, see #628).These three commands now apply what a plain
playapplies, through the samesettings()(defaults table plusvictory-settings.txt). A variable already set in the environment is kept, so warming under another value still works.play --preloadis unchanged: thepreloadit starts already has the start's environment.How it was tested
playvictory shadersthenvictory warm --used, thenplay):shaders from the cache and translated so far hits=0 misses=1709, and some pipelines took 20-44 s to make during the startshaderstranslated 25763 shaders fresh (116 s), thenplayloggedhits=1924 misses=0andhost pipelines all made made=1621 loaded=1113cargo test: not run forapps/victory;cargo xwin check --workspace --all-targetsand clippy onvictorypassChecked for overlap
warmonly and copies EARLY_DEPTH, AMBIENT_SPECULAR and WATER_LIGHT by hand, so it misses NAN_SCRUB and BVH_MISS; this one reusessettings()and coversshaders,warmandpreload), fix(warm): inherit victory-settings.txt and play shader defaults #549 (closed)