WIP: fix(game): what the game decided on this PC stays beside the settings, and a loose cache that cannot move is deleted #345
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
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/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!345
Loading…
Reference in a new issue
No description provided.
Delete branch "lndf/Longshot:fix/game-layout-followup"
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?
Why
#321 put
longshot_driver_faults.txtincache/, which the README says can be deleted. A player who clears it to fix something would lose the record of the shaders their driver faulted on, and run into the driver fault again, which on AMD's Windows driver froze the game (issue 996). This follow-up to #321's review also fixes a loose cache that can never move, and docs whose commands point at the old place.What changed
cache/:longshot_driver_faults.txt,longshot_prepare_skippedandlongshot_load_start.txt(with its.waited).driver_faults_pathandload_fallback_pathingpu/vk/vk_draw.cpp, andskipped_pathinvk_main.cpp, now give the game folder.host/game_layout.cno longer moves these intocache/. A folder #321 already moved has them moved back out (records).host/game_layout.cmove_as). Whencache/already has its own copy (the first move failed, the file held open, and the game then made a new one), the loose one is deleted, and the log says how many files and MB. Logs are never deleted; a loose log stays, as before.assets/pipeline_states/README.mdanddocs/development.mdnow givecache/longshot_pipeline_states.binin theaddcommand and steps, which failed with the old path.cacheholds besides caches (the pipeline list you can send in) and what stays out of it.docs/development.mddescribes the layout and what switching one game folder between a build from before #321 and one after it costs.RX_VK_LOADandRX_VK_DRIVER_FAULTSrows give the game folder again.vk_progcache.cpp,vk_draw.cpp,driver_faults.h,vk_main.cpp.tests/test_game_layout.pychecks that the records stay and move back out ofcache/, that a loose cache with acache/copy is deleted, and that a loose log stays.tests/test_load_default.pychecks that the marker is in the game folder.Flags and settings
None.
Measurements
Not a performance change: files move between folders, and nothing is measured in frames. The checks below and a run in the game (Testing) are what count.
main:
cf605c85(2026-11-14)this PR: fix/game-layout-followup @
d82f2026Testing
Tested:
python -I -B tests/run_all.pyon Linux (Fedora 45): 484 passed. The four failures fail on a cleanmaintoo:test_bake_portability,test_lift_cache(this PC's Python has no numpy),test_module_idsandtest_pad_layout(#331 fixes it).tests/test_game_layout.py: the new cases, plus those from #321.longshot_vk.dll, builds (RX_TARGET=windows RX_VK_ONLY=1 nx2/build.py --standalone);host/*.ccompile with the build's host flags, among themhos_main.c,game_layout.candprompts.c;game_layout.calso passes-Wall -Wextra -Werror;Not tested:
cache/on a folder #321 moved, and the deletion of a loose cache that couldn't move.MoveFileExA,FindFirstFileAwith*.tmp-*), the log rotation intologs\ingame_main, a file held open while the game moves it. Not run on Windows yet, for #321 or this PR.Needs other testers:
Windows: update a launcher-built game folder with
--cli --update, then play it. Expect:cache\(longshot_vk_pipelines.bin), the logs inlogs\,longshot_driver_faults.txtbeside the game;logs\when started by the launcher.(request to open)
Screenshots
Nothing on screen.
Risk and rollback
A loose cache file is deleted only when
cache/has a file of the same name. It's a cache, so the worst case is the game making it again (a shader preparation, minutes). Logs are never deleted. The records move only out ofcache/into the game folder, never over a file there. Reverting the commit puts them back incache/on the next start of a build with #321's list.Reviewer notes
The rest of #321's review:
longshot_startup.log: nothing writes it onmain, here or in the launcher. The Linux builder's play diagnostics that wrote it were removed (#171), so README line 195 is stale.host/game_layout.conly moves an old one intologs/.longshot_log.txtfrom the game folder. With #321 it has to look inlogs/first, then the game folder; I'll say so on that PR.Issues
See #321
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.