Repository navigation
Build: prepare the shaders at the end of the build, not at the first start - #819
klimovich008 wants to merge 2 commits into
Conversation
|
Let's add a checkbox so that this can either be done during build or on first load. Let's have it enabled by default (so it's during build) |
…start make_game.py now runs hookshot --prepare-shaders as its last step, so the minutes of shader preparation happen under the builder's progress bar instead of behind the game's black window at its first start (issue 711). The command has been in the game since PR 320, but nothing ran it. Its @@stage/@@progress lines go on to the builder; its own @@done and @@error go on as plain text, since both builders read those as the build's end or failure. A PC without usable Vulkan (exit 3) or any other failure leaves the work to the first start, as before. HOOKSHOT_NO_PREPARE=1 skips the step. The Windows builder gets a "Prepare the shaders" row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Done: both builders now have a "Prepare shaders now" tick, on by default.
Checks: |
04afac9 to
122a485
Compare
Unticked, the builders pass make_game.py --no-prepare-shaders and the game prepares its shaders at its first start, as before. The choice is kept (builder-settings.json on Windows, builder.ini on Linux) and used for updates too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for adding the tick! On current main tests/test_linux_builder_jobs.py fails with this branch (7 errors, in CI too). Closing to keep the queue clear — please rebase on current main, fix that test, and reopen; thanks! |
|
Rebased on current main and fixed |
What
make_game.pynow runshookshot --prepare-shadersas its last step, so shader preparation happens during the build, under the builder's progress bar, instead of at the game's first start.@@stageand@@progresslines go on to the builder unchanged. Its own@@done shadersand@@error ...lines go on as plain text, because both builders read those as the build itself finishing or failing.make_game.py --no-prepare-shadersand the game prepares at its first start, as today. The choice is remembered and used for updates.HOOKSHOT_NO_PREPARE=1also skips the step.Why
hookshot --prepare-shadershas been in the game since PR #320, but nothing runs it: notmake_game.py, the Windows builder or the Linux builder. So every player gets the preparation at their first start, as minutes of a black game window. Its progress only shows in a console window that can open behind the game, which is why it looks like a hang (#26, #711, the "stuck at 99%" reports behind #701).On my PC (RX 9070 XT, Ryzen 7 5700X3D), the first start after a fresh v2.0.3 build took 197 s before the first frame; it was 302 s on v2.0.2. A warm start takes 5.5–7.5 s. With this change, those minutes move into the build, where the player expects to wait and can see progress.
This PR doesn't change what gets prepared. It runs the same
prepare_runthe first start runs, so it neither fixes nor worsens the compute-layout bug that #772 fixes. #701, #702 and #772 change how the preparation works, not when it runs, so this combines with them.Testing
tests/test_prepare_at_build.py(4 cases):@@done: the first two are relayed, and@@donecomes through as plain text;@@errorand exits 3: no@@line reaches the builder, the function returns 3, and the message says the game will prepare at first start;main(): it runs after the game folder is swapped in, the shader list is written and the pipeline seed is copied, and before@@done.test_finish_output.py,test_builder_status.py,test_build_log.py.hookshot.exe --prepare-shadersrun with its stdout piped printed its@@progressand@@done shaderslines and exited 0. That confirms the relay gets the lines on Windows too.StagesandWeighttables.🤖 Generated with Claude Code