fix(host): drop Steam Fossilize and NVIDIA cache overrides on Windows #2883
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2883
Loading…
Reference in a new issue
No description provided.
Delete branch "ImpulsiveOrange8114/Longshot:fix/win-steam-shader-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On Windows with an NVIDIA GPU, launching a prepared Longshot install through a Steam non-Steam library shortcut (with Steam Shader Pre-Caching enabled, the Steam default) compiles all ~42k pipelines at ~46–126/s (~15+ minutes) instead of loading in seconds as a direct launch does.
How to see the bug on
main:%LOCALAPPDATA%\NVIDIA\GLCache\<app-hash>.binandlongshot_vk_pipelines.binare warm).longshot_log.txtlogsFossilize ERROR: Failed to parse ApplicationInfoFilter, letting recording go through.(serializing ~328 MB intosteamapp_pipeline_cache.foz), and NVIDIA's Windows Vulkan driver honors Steam's__GL_SHADER_DISK_CACHE_PATH(.../steamapps/shadercache/<appid>/nvidiav1) and__GL_SHADER_DISK_CACHE_APP_NAME=steamapp_shader_cache0, ignoring the warm<app-hash>.binin%LOCALAPPDATA%\NVIDIA\GLCacheand compiling from scratch (texture pipelines1,470 ms vs 3–4 ms; precompile ~46–126 pipelines/s). Even when__GL_SHADER_DISK_CACHE_PATHis unset,__GL_SHADER_DISK_CACHE_APP_NAME=steamapp_shader_cache0still forces NVIDIA to create a coldsteamapp_shader_cache0.binbeside the warm cache file.What this changes:
host/steam_shader_env.h(new, stdlib-only helper): detects Steam Fossilize activation (ENABLE_VK_LAYER_VALVE_steam_fossilize_1) and Steam-injected NVIDIA cache overrides (__GL_SHADER_DISK_CACHE_APP_NAME/_READ_ONLY_APP_NAMEstarting withsteamapp_, orSteamAppId/SteamGameId+shadercachein__GL_SHADER_DISK_CACHE_PATH). Player-configured non-Steam__GL_SHADER_DISK_CACHE_*settings are left untouched.host/hos_main.c(win_steam_driver_env_choose,#ifdef _WIN32): runs afterhos_profiling_env()and before Vulkan loads; setsDISABLE_VK_LAYER_VALVE_steam_fossilize_1=1, unsetsENABLE_VK_LAYER_VALVE_steam_fossilize_1and Steam's__GL_SHADER_DISK_CACHE_*vars via bothSetEnvironmentVariableAand_putenv, and records avk:line indriver_env_saidfordriver_env_log().gpu/vk/pcache_load.h(nvidia_cache_windows) andgpu/vk/vk_draw.cpp(pcache_load_off,driver_cache_bytes): honor__GL_SHADER_DISK_CACHE_PATHon Windows when set instead of always assuming%LOCALAPPDATA%\NVIDIA\GLCache.tests/test_win_steam_shader_env.pyandtests/test_pcache_load.py: unit + Win32 environment tests for Steam vs. player-chosen overrides and Windows__GL_SHADER_DISK_CACHE_PATHresolution.Result: Launching from Steam with Shader Pre-Caching enabled now disables Fossilize, reuses the prepared NVIDIA
GLCache, and matches direct-launch startup times.Testing
Tested:
621.01/0x9b404000, 32 GB RAM, NVIDIA Shader Cache Size 100 GB): Builtlongshot.exeandlongshot_vk.dllfrom this branch, hard-linked the prepared cache (translator_stamp=d1b6a64911547e0b), and launched directly via a Steam Non-Steam Game shortcut with Steam Shader Pre-Caching enabled and blank Launch Options:vk: Steam Fossilize layer disabled and Steam NVIDIA shader cache overrides dropped so NVIDIA reuses the prepared GLCacheFossilize INFO/ERRORlines inlongshot_log.txttexture pipelines made before the game in 4 ms(was1,470 ms)precompile: load at create (RX_VK_LOAD=create): 38772 noted pipelines found, none built ... in 36 ms(was ~15+ min)llvm-mingwclang/clang++):python -I -B tests/test_win_steam_shader_env.py— failed onmain, passed here (covers pure decision table,hos_main.cwiring, and real Win32 + CRT env clearing)python -I -B tests/test_pcache_load.py— all 16 Windows cases passed, including newwin-override-warmandwin-override-coldpython -I -B tests/test_profiling_mode.py— passedclang -x c-header -std=c11 -fsyntax-only -Wall -Wextra -Werror host/steam_shader_env.h— passedStill to test:
by hand)Measurements
Verdict: Eliminates Steam-induced cold shader/pipeline recompilation on Windows + NVIDIA, cutting Steam launch shader startup from ~15+ minutes (aborted after 403.4 s at 18,735/42,193 pipelines) down to matching direct launch (
4 mstexture pipelines,36 msto verify 38,772 noted pipelines with 0 compiled).Setup: Windows 10 x64, NVIDIA GeForce RTX 3060 Ti (driver
621.01), 32 GB RAM, same warm1.28 GBlongshot_vk_pipelines.bin+1,802 MB%LOCALAPPDATA%\NVIDIA\GLCache, launched via Steam Non-Steam shortcut with Steam Shader Pre-Caching enabled.6f5f99fc94099bec.fozwritten)0Fossilize lines)Risks
ENABLE_VK_LAYER_VALVE_steam_fossilize_1) and Steam's own NVIDIA cache overrides (steamapp_*app names or Steamshadercachepaths whenSteamAppId/SteamGameIdis set). Non-Steam player overrides are preserved.longshot_options.ini, or existing shader caches change on update; players who previously launched via Steam with Shader Pre-Caching on will immediately reuse their prepared%LOCALAPPDATA%\NVIDIA\GLCacheinstead of Steam's duplicate per-AppID folder.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Possibly related, for context:
1b4513828c94099becfefix(host): drop Steam Fossilize and NVIDIA cache overrides on Windowsto WIP: fix(host): drop Steam Fossilize and NVIDIA cache overrides on WindowsWIP: fix(host): drop Steam Fossilize and NVIDIA cache overrides on Windowsto fix(host): drop Steam Fossilize and NVIDIA cache overrides on Windows@review
Recommendation: Request changes. The environment cleanup can discard player-selected NVIDIA cache settings and can turn a warm Steam cache into a cold cache after an update. The reported NVIDIA result is promising, but it does not cover those cases or the other Windows GPUs affected by disabling Fossilize.
On Windows, the change disables Steam Fossilize and redirects Steam-injected NVIDIA shader caches to the normal driver cache. It also makes the pipeline-cache policy inspect an overridden NVIDIA cache path; this can avoid a long Steam startup when the normal cache is already warm, but changes cache selection for existing users.
Blocking (2): must change before merging.
host/hos_main.c:1008: Detecting any one Steam cache value removes every NVIDIA cache override, including unrelated player-selected values. (more on the line) Do: Classify and remove the Steam-injected values individually, preserving custom path and app-name settings, and add mixed Steam/player environment cases to the test.host/hos_main.c:1001: The unconditional cache switch discards a previously warm Steam driver cache even when the normal NVIDIA cache is cold. (more on the line) Do: Preserve or migrate the warm cache when switching locations, or arrange preparation of the destination before relying on it; cover an upgrade from a Steam-only warm cache.Should fix (1): not blocking, but worth doing before merging.
tests/test_win_steam_shader_env.py:186: The Windows test's environment filter compares mixed-case prefixes against environment keys that Python normalizes to uppercase on Windows. (more on the line) Do: Compare normalized uppercase keys against uppercase prefixes before constructing each test environment.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L1, L2 and L3.Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven. The author reports texture-pipeline creation falling from 1,470 ms to 4 ms and a warm pipeline lookup taking 36 ms instead of a precompile aborted at 403.4 seconds. Those are single reported runs with different pipeline counts, and the stated before commit is not the supplied merge base; repeated comparisons and cold-cache results are missing.
Other systems: The host change disables Fossilize on Windows regardless of GPU, so AMD and Intel Steam launches also change; the PR lists them as untested. Linux is excluded from the host change. Windows NVIDIA systems with a player-selected cache or a cache warmed only under Steam can take different paths. The cache-size policy affects NVIDIA systems with at most 20 GB RAM and load-at-create enabled.
Switches: No Longshot switch is added. On Windows the change sets the Vulkan loader's DISABLE_VK_LAYER_VALVE_steam_fossilize_1 to 1 and removes its ENABLE counterpart when enabled; it also removes selected NVIDIA cache environment variables when it detects a Steam marker. These defaults need the cache-preservation fixes and cross-GPU validation described below.
Reviewed:
94099becfeagainst28cb22b9ed: Read the repository rules, PR template, commit and complete diff; read host/steam_shader_env.h, gpu/vk/pcache_load.h and the new test in full, and inspected the changed functions and callers in host/hos_main.c, gpu/vk/vk_draw.cpp and tests/test_pcache_load.py. The remainder of the large host and renderer files and builder code was skimmed, not read in full. docs/review-checklist.md and the adjacent Tooling checkout were absent. No recorded runs, translations or generated files were changed.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no builds, scripts or tests were run. The author reports Windows game and game-free checks; CI is still running.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -977,0 +998,4 @@_putenv("DISABLE_VK_LAYER_VALVE_steam_fossilize_1=1");win_unset_env("ENABLE_VK_LAYER_VALVE_steam_fossilize_1");}if (plan.drop_nv_cache) {L2 (blocking): The unconditional cache switch discards a previously warm Steam driver cache even when the normal NVIDIA cache is cold.
When: A player who prepared and played through Steam before updating can have the pipelines in Steam's cache but none in the default GLCache. This code removes the Steam path and app name, so the next launch uses the cold default and recompiles work that previously hit the warm cache.
Do: Preserve or migrate the warm cache when switching locations, or arrange preparation of the destination before relying on it; cover an upgrade from a Steam-only warm cache.
@ -977,0 +1005,4 @@"__GL_SHADER_DISK_CACHE_READ_ONLY_APP_NAME","__GL_SHADER_DISK_CACHE_READ_ONLY_APP_NAME_2",};for (size_t i = 0; i < sizeof nv_vars / sizeof *nv_vars; i++) win_unset_env(nv_vars[i]);L1 (blocking): Detecting any one Steam cache value removes every NVIDIA cache override, including unrelated player-selected values.
When: A Steam launch with its steamapp_ app name and a player-selected __GL_SHADER_DISK_CACHE_PATH=D:\MyNvCache sets drop_nv_cache, then unsets the custom path as well. The driver uses a different cache and the player's configured location is ignored.
Do: Classify and remove the Steam-injected values individually, preserving custom path and app-name settings, and add mixed Steam/player environment cases to the test.
@ -0,0 +183,4 @@raise SystemExit("FAIL: win harness exited %d\n%s" % (out.returncode, out.stderr))return dict(line.split("=", 1) for line in out.stdout.splitlines()), out.stderrbase = {k: v for k, v in os.environ.items()L3 (should fix): The Windows test's environment filter compares mixed-case prefixes against environment keys that Python normalizes to uppercase on Windows.
When: If the test is started with Fossilize enabled, the inherited ENABLE_VK_LAYER_VALVE_STEAM_FOSSILIZE_1 survives the filter. The custom-cache case then disables Fossilize and fails even though that case intended a clean environment.
Do: Compare normalized uppercase keys against uppercase prefixes before constructing each test environment.
Addressed L1, L2, and L3 from review #2884 in
f4fea4a8:steam_shader_env_classify()inhost/steam_shader_env.handwin_steam_driver_env_choose()inhost/hos_main.cnow classify and unset__GL_SHADER_DISK_CACHE_PATH,_APP_NAME,_READ_ONLY_APP_NAME, and_READ_ONLY_APP_NAME_2individually so player-configured custom paths or app names are preserved alongside Steam env vars. Added mixed Steam/player test cases.FindFirstFileWcheck (depth ≤ 4, entries ≤ 4096, stops at512 MiBmatchingpcache_load::kWarmMb, separatingsteamapp_*from non-steamapp_*files) plussteam_shader_env_apply_cache(). When Steam's NVIDIA cache is warm (>= 512 MiB) and the destinationGLCacheis cold (< 512 MiB), Steam's NVIDIA cache overrides are preserved (while Fossilize is still disabled) and logged. Added sparse-file upgrade test cases covering both Steam'snvidiav1folder andsteamapp_*inside the defaultGLCache.tests/test_win_steam_shader_env.pynow normalizes env keys with.upper()against uppercase prefixes and verifies inheritedENABLE_VK_LAYER_VALVE_STEAM_FOSSILIZE_1/STEAMAPPIDare stripped before each test case.Verified locally (Windows,
llvm-mingwclang/clang++):python -I -B tests/test_win_steam_shader_env.py(run withENABLE_VK_LAYER_VALVE_steam_fossilize_1=1set in the parent env) — passedpython -I -B tests/test_pcache_load.py(all 16 Windows cases) — passedpython -I -B tests/test_profiling_mode.py— passedclang -x c -std=c11 -fsyntax-only -Wall -Wextra -Werroronhost/steam_shader_env.h— passedRemaining before merge (L4 & L5):
28cb22b9vsf4fea4a8covering warm default and warm Steam-only caches.@Beanstalk).@ImpulsiveOrange8114 only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was forf4fea4a, and the PR has changed since (399643a), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.fix(host): drop Steam Fossilize and NVIDIA cache overrides on Windowsto WIP: fix(host): drop Steam Fossilize and NVIDIA cache overrides on WindowsWIP: fix(host): drop Steam Fossilize and NVIDIA cache overrides on Windowsto fix(host): drop Steam Fossilize and NVIDIA cache overrides on Windows@review
Recommendation: Request changes. The warm-cache safeguard can still discard a player's warm Steam cache when other applications make the default NVIDIA cache appear warm. The startup comparison and AMD/Intel runs also remain outstanding.
The change disables Steam Fossilize and can reuse the prepared NVIDIA cache for faster Windows Steam launches. The follow-up preserves individual player overrides and attempts to retain a warm Steam-only cache, at the cost of a bounded cache-directory scan at startup.
Blocking (1): must change before merging.
host/hos_main.c:1001: The unconditional cache switch discards a previously warm Steam driver cache even when the normal NVIDIA cache is cold. When: A player who prepared and played through Steam before updating can have the pipelines in Steam's cache but none in the default GLCache. This code removes the Steam path and app name, so the next launch uses the cold default and recompiles work that previously hit the warm cache. Do: Preserve or migrate the warm cache when switching locations, or arrange preparation of the destination before relying on it; cover an upgrade from a Steam-only warm cache.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L2.Since the last review (on
94099becfe)Resolved: L1 (Detecting any one Steam cache value removes every NVIDIA cache override, including unrelat…); L3 (The Windows test's environment filter compares mixed-case prefixes against environment key…)
Still open: L2 (The unconditional cache switch discards a previously warm Steam driver cache even when the…); L4 (The reported startup improvement needs a repeatable comparison against the supplied merge…); L5 (Disabling Fossilize also changes Windows Steam launches on AMD and Intel, which have not b…)
Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: the reported Windows NVIDIA run reduced texture-pipeline startup from 1,470 ms to 4 ms and avoided compilation of 38,772 noted pipelines, but it was not a repeated comparison against the supplied merge base and does not cover both cache states.
Other systems: The environment changes apply to Windows Steam launches on AMD and Intel as well as NVIDIA; AMD and Intel runs remain outstanding. The new cache scan affects Windows launches with detected Steam NVIDIA overrides. Linux does not execute that host path.
Switches: No player switch added. On Windows, the change sets DISABLE_VK_LAYER_VALVE_steam_fossilize_1 and removes Steam-classified environment overrides unless the warm-cache safeguard keeps them.
Reviewed:
f4fea4a828against28cb22b9ed: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the follow-up diff, host/steam_shader_env.h, the changed host code, and the Windows environment test. Skimmed the renderer diff and reported runs. The review checklist and sibling Tooling AGENTS.md were unavailable; the remaining changed files were not read in full.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run. The author reports Windows unit and environment checks passing; CI is still running.
Overlaps and merge order: none found
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@fix
I didn't fix this pull request: its branch
fix/win-steam-shader-cacheis protected (or gone).Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Fixed the remaining L2 edge case in
399643ae(BeanBot couldn't push to the fork branch directly):gpu/vk/vk_draw.cpp(driver_env_note, called on Windows fromprecompile_warm,precompile_run,predict_run, andprecompile_at_create) now atomically writeslongshot_nv_cache_warm.txtin Longshot's shader cache folder whenever Longshot warms a non-Steam NVIDIAGLCache.host/hos_main.c(win_nv_cache_noted) +host/steam_shader_env.h(steam_shader_env_apply_cache) now require bothlongshot_nv_cache_warm.txtmatching the destinationGLCacheand>= 512 MiBof non-steamapp_*files there before dropping a warm (>= 512 MiB) Steam NVIDIA cache — so unrelated applications' files in%LOCALAPPDATA%\NVIDIA\GLCachecan no longer trigger a switch away from a warm Steam cache, and a stale marker after the user clears the default cache still preserves a warm Steam cache.tests/test_win_steam_shader_env.pycovering other apps' files in defaultGLCache, a matching Longshot marker, and an emptied default cache with a stale marker. Verified locally withtest_win_steam_shader_env.py,test_profiling_mode.py, and C11-Wall -Wextra -Werrorsyntax checks.I have also updated my profile visibility so BeanBot can make any further changes if necessary
@review
Recommendation: Request changes. The cache marker can be written without establishing that Longshot’s destination driver cache is warm, so unrelated applications’ files can still cause a warm Steam cache to be discarded. The repeated startup comparison and Windows AMD/Intel runs also remain outstanding.
The change disables Steam Fossilize on Windows and tries to reuse a prepared NVIDIA cache while preserving a warm Steam-only cache. It adds cache detection and marker bookkeeping, but the marker does not yet establish the warmth it represents.
Blocking (1): must change before merging.
host/hos_main.c:1001: The unconditional cache switch discards a previously warm Steam driver cache even when the normal NVIDIA cache is cold. When: A player who prepared and played through Steam before updating can have the pipelines in Steam's cache but none in the default GLCache. This code removes the Steam path and app name, so the next launch uses the cold default and recompiles work that previously hit the warm cache. Do: Preserve or migrate the warm cache when switching locations, or arrange preparation of the destination before relying on it; cover an upgrade from a Steam-only warm cache.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L2.Since the last review (on
f4fea4a828)Still open: L2 (The unconditional cache switch discards a previously warm Steam driver cache even when the…); L4 (The reported startup improvement needs a repeatable comparison against the supplied merge…); L5 (Disabling Fossilize also changes Windows Steam launches on AMD and Intel, which have not b…)
Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: the reported RTX 3060 Ti run reduced texture-pipeline startup from 1,470 ms to 4 ms and noted-pipeline work from an interrupted 403.4 seconds to 36 ms, but repeated comparisons against the supplied merge base for both cache states are missing.
Other systems: Windows AMD and Intel Steam launches also lose Fossilize and have not been reported. Linux does not take the Windows environment path; the new Windows marker is also written by several renderer precompile paths.
Switches: No switches added, changed, or removed.
Reviewed:
399643ae8fagainst28cb22b9ed: Read AGENTS.md, CONTRIBUTING.md, host/steam_shader_env.h and gpu/vk/vk_paths.h in full; inspected the fix diff, marker writer and reader, and their relevant callers. Other changed files, the full base diff, repository checklist and template were not read in full.; nothing run (a code review).Checked and fine:
Testing: Author reports Windows game-free checks and one NVIDIA in-game run; no commands or tests were run in this review. CI is still running.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Closed the marker-writer loophole on L2 in
a9754d97:driver_env_note()with a dedicated#ifdef _WIN32win_nv_cache_warm_note()helper ingpu/vk/vk_draw.cpp.longshot_nv_cache_warm.txtis now written only after a driver-only scratch-cache probe (notes_lost_by_driver()/last_driver_probe_warm, usingVK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT) positively confirms that at leastkSample / 3(16) sampled Longshot noted pipelines were probed and>= 75%hit directly in the non-Steam NVIDIA driver cache without compiling.predict_run(), empty note lists,Compile shaders: Off, interrupted runs, or runs where the driver cache probe does not positively confirm warmth.win_is_abs_wpath()inhost/hos_main.cwin_nv_cache_noted()soLONGSHOT_SHADER_CACHEis only honored when absolute (matchinggpu/vk/vk_paths.h), and verifiedtest_win_steam_shader_env.py,test_cold_cache_check.py,test_driver_cache_env.py,test_profiling_mode.py, andtest_note_refs_once.py.a9754d97ec9a871d69cb@review
Recommendation: Request changes. A stale marker can still cause Longshot to discard a warm Steam cache after its own destination cache files have been cleared. The startup gain also needs repeated comparisons, and the Windows AMD and Intel paths remain untested.
The change disables Steam Fossilize and selectively removes Steam’s NVIDIA cache overrides on Windows to reuse a prepared driver cache. It adds a probe and marker to protect existing warm Steam caches, but the marker can outlive the cache it describes.
Blocking (1): must change before merging.
host/hos_main.c:1001: The unconditional cache switch discards a previously warm Steam driver cache even when the normal NVIDIA cache is cold. When: A player who prepared and played through Steam before updating can have the pipelines in Steam's cache but none in the default GLCache. This code removes the Steam path and app name, so the next launch uses the cold default and recompiles work that previously hit the warm cache. Do: Preserve or migrate the warm cache when switching locations, or arrange preparation of the destination before relying on it; cover an upgrade from a Steam-only warm cache.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L2.Since the last review (on
399643ae8f)Still open: L2 (The unconditional cache switch discards a previously warm Steam driver cache even when the…); L4 (The reported startup improvement needs a repeatable comparison against the supplied merge…); L5 (Disabling Fossilize also changes Windows Steam launches on AMD and Intel, which have not b…)
Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven by the requested comparison. The reported NVIDIA run reduced texture-pipeline startup from 1,470 ms to 4 ms and found 38,772 pipelines in 36 ms, versus an aborted baseline at 18,735 of 42,193 after 403.4 seconds. Repeated interleaved runs against the supplied merge base for both warm and cold cache states are still missing.
Other systems: The environment changes affect Windows Steam launches on NVIDIA, AMD and Intel; AMD and Intel runs have not been reported. Linux does not take the Windows environment path. The new marker depends on the NVIDIA driver-only pipeline probe and on the cache files remaining present afterwards.
Switches: No player switch added or changed. On Windows, Steam’s Fossilize enable variable is cleared and its disable variable is set to 1; Steam-classified NVIDIA cache variables are conditionally cleared or retained.
Reviewed:
9a871d69cbagainst56823e27a1: Read the repository rules, pull request template, changed host helper and cache-selection code, the marker and probe changes, and their surrounding callers. Skimmed the test changes and recorded runs. The large renderer and host files were read around the affected paths, not in full; the full review checklist and developer standards were not read.; nothing run (a code review).Checked and fine:
Testing: No commands from the project were run. The author reports a Windows NVIDIA game run and game-free checks; CI is still running.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Rebased onto latest
main(9a926c2e, resolving thehost/hos_main.cconflict from#2822) and simplified L2 in7dcdb568by removing the pre-VulkanGLCachedirectory walk,longshot_nv_cache_warm.txtmarker, and Windows scratch-probe feedback loop (keeping L1 per-variable Steam env classification, L3 uppercase test env scrubbing, Fossilize disable, and Windows__GL_SHADER_DISK_CACHE_PATHcache measurement).Why: As BeanBot's latest review (#3093) itself showed, any pre-Vulkan heuristic or sidecar marker over NVIDIA's shared, driver-managed
%LOCALAPPDATA%\NVIDIA\GLCachecan outlive the cache after a driver update or eviction by other apps, and Steam'ssteamapp_*cache files cannot be migrated because NVIDIA's GLCache format is proprietary. Dropping Steam's conflicting override unconditionally before Vulkan loads matches how Linux'sdriver_env_choose()handlesRADV_FORCE_VRS_CONFIG_FILEand ensures Steam launches consistently reuseLongshotLauncher's prepared GLCache rather than staying split.Verified locally (Windows,
llvm-mingwclang/clang++):python -I -B tests/test_win_steam_shader_env.py— passedpython -I -B tests/test_pcache_load.py(all 16 Windows cases) — passedpython -I -B tests/test_profiling_mode.py— passedclang -x c-header -std=c11 -fsyntax-only -Wall -Wextra -Werror host/steam_shader_env.h— passed@HumanBean @llun — could a maintainer weigh in on whether this simpler Linux-style approach is preferred over trying to guess pre-Vulkan
GLCacheownership?ec8db3c4467dcdb56885@review
@review
Recommendation: Request changes. The change drops a warm Steam NVIDIA cache even when the destination cache is cold, potentially forcing an existing Steam player through a long shader recompilation. The reported improvement also needs repeated comparisons, and Windows AMD and Intel launches remain untested.
Windows Steam launches disable Fossilize and remove NVIDIA cache overrides classified as Steam-owned, allowing a prepared default cache to be reused. This simplifies the earlier cache-preservation design but can sacrifice an already-warm Steam cache.
Blocking (1): must change before merging.
host/hos_main.c:1001: The Steam NVIDIA cache overrides are removed without preserving an already-warm Steam cache when the destination is cold. When: A player who has only launched through Steam has a warm Steam driver cache but a cold default GLCache. The classified Steam path and app names are cleared before Vulkan loads, so the driver uses the cold destination and recompiles the pipelines. Do: Preserve access to the warm Steam cache when switching would leave the player with a cold destination, without relying on a stale ownership marker.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L2.Since the last review (on
9a871d69cb)Still open: L2 (The Steam NVIDIA cache overrides are removed without preserving an already-warm Steam cach…); L4 (The reported startup improvement needs a repeatable comparison against the supplied merge…); L5 (Disabling Fossilize also changes Windows Steam launches on AMD and Intel, which have not b…)
Checks: Still running: 10 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven as a repeatable gain. The PR reports one Windows RTX 3060 Ti comparison: texture pipeline startup fell from 1,470 ms to 4 ms, and 38,772 noted pipelines were found in 36 ms after the change; the before run was stopped at 18,735 of 42,193 after 403.4 seconds. The comparison used different commits and pipeline counts, and repeated interleaved runs against the supplied merge base are missing.
Other systems: The environment changes apply to Windows Steam launches on NVIDIA, AMD and Intel; AMD and Intel hardware runs have not been reported. Linux does not call the Windows helper. Windows cache measurement also follows a retained NVIDIA path override.
Switches: On Windows, the change sets DISABLE_VK_LAYER_VALVE_steam_fossilize_1=1 and clears the corresponding enable variable when active; it also clears NVIDIA cache path and app-name variables classified as Steam-owned. There is no new player switch. Unconditional removal of a warm Steam cache override is not a safe default for a cold destination cache.
Reviewed:
7dcdb56885against9a926c2e93: Read the pull request diff, commit log, repository rules, template, Steam environment helper and its tests; inspected the host and renderer call sites and prior cache-preservation implementation. The large renderer and host files were skimmed around relevant changes rather than read in full.; nothing run (a code review).Checked and fine:
Testing: No commands from the project were run. The author reports Windows game and game-free checks; CI checks are still running.
Overlaps and merge order: none found
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Ok, well this works in practice on multiple builds , and the automated check caring about warm steam cache on windows is just an endless loop. Feel free to pull this in and merge, but I'm not going to argue with a bot after asking for direct review.
@ImpulsiveOrange8114 I'll take a manual look
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.