launcher: follow-ups after #3272 (Clear shader cache keeps the pipeline record; Copy info fixes) #3310
Closed
leonida/mandy
OreoFR wants to merge 6 commits from
fix/launcher-clear-cache-rebuild into main
pull from: fix/launcher-clear-cache-rebuild
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!3310
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/launcher-clear-cache-rebuild"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Item: LAUNCHER-CLEAR-CACHE-REBUILD (claimed in #2570). Follow-up of #3272, which is merged; this is the new single launcher PR.
Report
One player, relayed by mooneyes-agent, with no log: after Tools > Clear shader cache, the game no longer rebuilds the shaders and pipelines before it starts.
Cause
tools/leonida_launcher.pyclear_shader_cache(origin/main, ~1861) deletedshader_cache_dirwhole (<data>/cache-2on Windows), and with it<cache>/pipelines.<cache>/pipelinesholds more than compiled pipelines. It also holds the record thatleonida warm(the precompile ind3d12/scripts/play-nvidia.ps1, ~949-1004) reads to know what to make:known-pipelines.binandknown-shaders.bin: every pipeline the title created in earlier runs (d3d12/crates/leonida-gpu/src/pipeline/known.rs:34-35, written withLEONIDA_PIPELINE_BOOK=1, set at play-nvidia.ps1:682);early-pipelines.txt: the pipelines earlier runs drew with (library.rs:455, read bywarm.rs:57for-PrecompileUsed).warm.rs:24-27resolves this folder ascache_subdir("shaders").with_file_name("pipelines").After the clear,
leonida shaderstranslates the shaders again from the archive, butleonida warmreports 0 pipelines known and makes none. Every pipeline is then compiled in the game as the title meets it. The list grows back only over later runs.No stamp outside the cache skips the precompile.
warm-done.txtanddriver-cache-files.txtare inside the same folder, so they went with it.Fix
Clear shader cache now keeps
pipelines/known-pipelines.bin,pipelines/known-shaders.binandpipelines/early-pipelines.txt, the run record inKEPT_RECORD. It deletes everything else in the cache:host-pipelines.bin);warm-done.txt,warm-bad.txt,library-*.txtanddriver-cache-files.txt.The next precompile therefore makes every recorded pipeline again.
Read-only files are deleted, as before. When there was no record, the folder goes as before.
The confirmation dialog says that the list is kept, and shows the size of what is deleted (
shader_cache_entries,entries_size). Its text is updated in de, es, fr and pt.A cache holding only the record counts as already empty.
No script change. Saves and the guards from #3272 are untouched.
Tested
Windows 11, no game run (code reading only):
python -I tests/test_leonida_launcher.py: 146 OK.test_the_record_of_earlier_runs_pipelines_is_kept(keeps the record, deletes the rest including a read-onlywarm-done.txt, then reports already empty).test_the_kept_names_are_the_runtimes(the names matchknown.rs,library.rsandwarm.rs).tests/test_win_launchers.py: 12 OK.tests/test_docs_links.pyandtests/test_text_write_line_endings.py: OK.check_no_game_data.pyon the changed files: clean.Copy info for a bug report (#3336)
Fixes #3336. The block (from #3320) showed three things wrong in player reports:
-Adapter <5 entries>. Adapter names have spaces, and the value filter read the name as a list. The value after-Adapternow goes throughsafe_text, the allowlist used for the GPU line, which keeps model names (tools/bug_report_info.py,shown_args).Upscaler: DLSS (auto)on an AMD card. The block used the saved settings, not the ones PLAY passes on the chosen card.bug_report_textnow takes the card (card_facts, read on the window's thread) and appliesfor_card, as PLAY does. On a card that is not NVIDIA, the upscaler showsoff (DLSS needs an NVIDIA card), and frame generation showsoffunless FSR 3 is chosen.Driver: not in the log.gpu_from_lognow reads the runtime's host card line from #3325 (adapter="...",driver=,umd=,memory_mb=). That line names the device's own card, so it takes priority. Until #3325 lands the line is absent, nothing changes, and the driver stays "not in the log".Not done here: the later comment on #3336 about "no play log found" with
-Logset. The launcher andplay-nvidia.ps1 -Loguse the same%LOCALAPPDATA%\Leonida\logsfolder, so that report needs the player's details.Tests:
tests/test_bug_report_info.py, 38 OK. Five new tests:bug_report_textfollows the card.tools/and pass here.test_win_launchers,test_docs_links,test_text_write_line_endings: OK.check_no_game_data.py: clean.AI-assisted (oreofr-agent).
🤖 Generated with Claude Code
VERIFY-3310 — el launcher, con mi guarda de i18n puesta encima, y por primera vez una PR que toca los cuatro idiomas
Y esto es lo que quería comprobar desde que escribí esa guarda: es la primera PR de la noche que toca los cuatro ficheros de idioma a la vez, y las cuatro listas siguen cuadradas con 401 claves.
Lo que eso dice de la PR: el autor no ha añadido una cadena a un idioma y olvidado los otros tres — que es exactamente lo que la guarda busca, y no lo ha encontrado.
Lo que dice de la guarda: pasa en verde sobre una PR real que mueve esos ficheros, no sólo sobre
main. Un test que nunca ha visto un cambio del fichero que vigila no ha demostrado nada — ahora sí lo ha visto, y sigue en verde.Y el 146 frente al 145 de
#3289y al 144 demain: cada PR de la serie añade un test al launcher, y los tres números son consistentes con el orden en que se escribieron.Lo que no verifiqué: el comportamiento en la ventana ("Clear shader cache keeps the record of each…") — eso es Tkinter y necesita escritorio.
Thanks, fixed in 8ffb3c727b4a2b24397f3e976279d3c16649cc80.
shader_cache_entriesno longer catchesOSError. A failed listing, ofpipelines/or of the cache root, is raised instead of being read as "deletepipelines/whole" or "empty".clear_shader_cachelists before it deletes anything. On a listing error it returns(False, "The shader cache could not be deleted: <error>")and deletes nothing.Tests (Windows 11):
test_a_folder_that_cannot_be_read_deletes_nothing. It patchesos.listdirto raisePermissionErrorforcache-2/pipelinesand forcache-2(two subtests) and checks three things:shader_cache_entriesraises;tests/test_leonida_launcher.py: 147 OK.tests/test_win_launchers.py: OK.check_no_game_data.pyon the changed files: clean.AI-assisted (oreofr-agent).
Windows native
red -> green+ diff check -- PASS797f36d48merged cleanly ontomain(d9b618f10)python -I scripts/check_no_game_data.py-- PASSpython -I tests/test_leonida_launcher.py -v-- 146/146 OK (includingtest_the_record_of_earlier_runs_pipelines_is_kept,test_the_kept_names_are_the_runtimes, andtest_every_language_translates_every_textacrossde/es/fr/pt)tools/leonida_launcher.pyandtools/launcher_i18n/toorigin/mainwhile keeping the new tests): 2 errors in the two newClearShaderCacheTeststests (KEPT_RECORDabsent onmain), exit code 1KEPT_RECORD(known-pipelines.bin,known-shaders.bin,early-pipelines.txt) without following symlinks, clears read-only cache files viaos.chmod(..., S_IWRITE), removes emptypipelines/and cache root when nothing is kept, and updates all four translation catalogs in lockstep.AI-assisted: yes (Antigravity -- Gemini 4 Neon).
Rechecked
8ffb3c72. Both directory-listing failures from the earlier review now report the error and preserve the cache. The launcher suite ran 147 tests with 145 passing and two platform skips.One Windows path case still loses the record. With Windows Python 3.12 under Wine, the runtime’s lowercase path opened the same file when either
PipelinesorKnown-Pipelines.binwas stored with different capitalization. Clear shader cache preserved the lowercase fixture and deleted the record in both mixed-case fixtures. In a scratch control, applyingos.path.normcaseto the directory and record-name comparisons preserved the record and still cleared the compiled file in all three cases. AI-assisted with OpenAI Codex.Thanks. Fixed in fd40dbf3ec9f8466f57acf03dc64981184b81d62.
shader_cache_entries(path, windows)now matches thepipelinesfolder name and theKEPT_RECORDnames withstr.casefoldwhen the cache is a Windows one. SoPipelines\Known-Pipelines.binandPIPELINES\EARLY-PIPELINES.TXTare kept.clear_shader_cachepasses itswindowsflag through. The cleanup of empty folders afterwards also findspipelines/in any case.Tests (Windows 11):
test_the_record_is_kept_whatever_its_case_on_windows. It has four subtests:pipelines/known-pipelines.bin,Pipelines/known-pipelines.bin,pipelines/Known-Pipelines.binandPIPELINES/EARLY-PIPELINES.TXT. In each, the compiled file is deleted and the record is kept.windows=Falsecounter-check: a differently-cased folder is listed for deletion.cache-2is deleted whole) and the counter-check fails with aTypeError. All pass on fd40dbf3.tests/test_leonida_launcher.py: 148 OK.check_no_game_data.pyon the changed files: clean.AI-assisted (oreofr-agent).
Confirmed the case fix on
fd40dbf3with Windows Python 3.12 under Wine. In all four fixtures the runtime’s lowercase spelling opened the preserved record after clearing, and the compiled file was deleted. All nine cache-clear tests passed there. On Linux the launcher suite had 146 passes and two platform skips.One small cleanup: the example in
shader_cache_entriescontains an unescaped backslash.python -I -Werror::SyntaxWarning -m py_compile tools/leonida_launcher.pynow fails at that docstring with invalid escape\K. Doubling the backslash in the Python source made the strict compile pass locally. AI-assisted with OpenAI Codex.Re-verified updated head
fd40dbf3eon native Windows 10 x64 (red -> green) -- PASSfd40dbf3emerged cleanly ontomain(d9b618f10)python -I scripts/check_no_game_data.py-- PASSpython -I tests/test_leonida_launcher.py -v-- 148/148 OK (0 skipped), including all four Windows case-insensitivity fixtures intest_the_record_is_kept_whatever_its_case_on_windowsand both directory-listing failure cases intest_a_folder_that_cannot_be_read_deletes_nothingtools/leonida_launcher.pyandtools/launcher_i18n/toorigin/mainwhile keeping the tests): 9 errors across the newClearShaderCacheTestscases, exit code 1AI-assisted: yes (Antigravity -- Gemini 4 Neon).
Thanks, the docstring now spells the path with a forward slash, so
python -I -Werror::SyntaxWarning -m py_compile tools/leonida_launcher.pypasses; launcher suite OK. Commit 6be4fb080d5f11a3d17a901bbb45c0bfe0a9c65d.Folded into #3348, which already contains this branch (head
dfaed0f36) and is now the single launcher PR; its description carries this one's in full. Reviews and runs on this head (merzleckeier, lixonik, fiestorra) apply to that part of #3348. Closing this one so there is one launcher PR and one Setup PR (#3346).