WIP: fix(builder): a preparation the GPU driver stalled is not promised for the first start #1174
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1174
Loading…
Reference in a new issue
No description provided.
Delete branch "TrashPanda/Longshot:fix/prepare-stall-message"
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?
Type: fix · Risk: low · Tested on: Linux, RTX 4070 Ti (game-free checks) · Needs: none
Why
When the GPU driver stops answering during the build's shader preparation, the build said the game would prepare the shaders at its first start. It does not: the stopped run leaves a marker, every start skips the preparation while it is there, and each shader is built when it is first drawn. Players were told to expect something that does not happen.
Restored from Hookshot 2985, by jarynclouatre, and split out of #286 so it can be reviewed and merged on its own.
How to reproduce
Seen on: any PC whose driver stalls during the shader preparation (exit status 4 from
prepare_watchdog)Settings and switches: defaults
Steps: build the game until the preparation is stopped by the watchdog
Expected: a line that says what happens next
Actual: "the game prepares them at its first start"
What changed
nx2/make_game.py'snot_preparedtakes the line's ending, and exit 4 now says the game builds each shader when it first draws it and the next build or update tries the preparation again. Longshot's builders are command line only, so the builder windows' part of the Hookshot fix is left out.Commits, each with its original author and message:
fac87a2efix(builder): a preparation the GPU driver stalled is not promised for the first start (jarynclouatre)When the GPU driver stops answering during the build's shader
preparation (
prepare_watchdog, exit status 4), the builder printed"the shaders were not prepared now (the GPU driver stopped responding):
the game prepares them at its first start". The game does not do that.
The stopped run leaves
hookshot_prepare_skippedbeside the game, andevery start skips the preparation while it is there, so each shader is
built when it is first drawn, until a later build's preparation runs
through and removes the file.
Change
nx2/make_game.py:not_preparedtakes the ending as an argument,defaulting to the old one (
FIRST_START). Exit 4 says "the game buildseach shader when it first draws it, and the next build or update tries
the preparation again". The other reasons keep their text, and the
marker's behaviour stays as it is.
ShaderStep.Note): the row says "Left to the game'sfirst start: why" as before, or "Not prepared: why. Then what happens".
window.py) and Linux builder(
hookshot_builder.py): the same, in each one's own wording.tests/builder_workers/Program.csfollows the rename.Testing
tests/test_prepare_at_build.py, new cases:first drawn. Exit 3, a silent run and another status keep "at its first
start".
on main on this machine (
test_bake_portability:zstandardis notinstalled;
nx2/test_texture_init_barrier.py:clang++is notinstalled).
tests/builder_workerswere not compiled: there isno .NET SDK on this machine.
Ported to Longshot: make_game.py's line and its check only. Longshot's builders are command line only (#171, #181), so
the builder windows' rows and their checks are left out.
Restored-from: https://github.com/NotRexed/Hookshot/pull/2985
Measurements
Verdict: nothing to measure: a correctness fix off the frame path, covered by game-free checks.
Flags and settings
None.
Testing
Tested: On Linux (kernel 7.0), RTX 4070 Ti,
main@71b1edd8, this PR @fac87a2e:tests/test_prepare_at_build.pypass. The full suite (tests/run_all.py) has not been run on this branch yet; a comment will follow when it has.Not tested: A build whose preparation the driver really stalls. Opened as work in progress until it runs in the game.
Must be tested:
Risks
What could break: the builder's line after a stalled preparation.
Turning it off: revert the commit.
Compatibility: Nothing changes.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.third_party/untouched (a new folder with aPROVENANCE.mdinstead).python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).When it applies
mainand passing here.Tested in game: Linux (Ubuntu 26.04.1, kernel 7.0.0-43), RTX 4070 Ti 12 GB, NVIDIA 595.99.02, Ryzen 7 9800X3D: this branch built together with the other 18 split from #218 and #284-#288, merged onto main @
71b1edd8(make_game.py --update, build v3.0.0-rc.5-82-g5952bb3d), then played by a scripted tour through the control bridge (scripts/memtour.py: a save loaded, Zora's Domain, the Market, Hyrule Field and Death Mountain Trail, 40 s each with walking and camera swings). All 4 stops reached, a clean quit, and no device loss or Vulkan error in the log. The build's shader preparation ran to the end without a stall, so the changed message did not show.Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.