mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
Record in shader-prepared.bin which seed it was prepared from, and prepare again at an update when the seed changed.
The prepared list named its shader variants and nothing about where they came from, so an update that keeps the prepared shaders (shader_carry) kept the old list whatever seed the new kit writes: variants only the new seed names, from a newer pipeline list or a change to which variants are prepared, were translated when play first drew them. The existing identities do not cover this: nx2navi_xlate.id and identities.txt name translators, which decide cache keys and what is carried over, not which variants are listed. The list is now version 2 (runtime/prp_file.h): after the head come the sha256 of seed-programs.bin, the sha256 of seed-answers.bin and the translator identity, written by gfx_shader_prepare_seed; the three readers go through gfx_shader_prepared_read and still read a version 1 list. At an update step_shaders writes the seed first (prepare_shaders.py --no-run, about 4 s) and keeps the list only when its digests are that seed's (make_game.py seed_changed); another seed, or a list that does not say, is prepared again. Another translator alone still carries over: input ids do not depend on the translator, and preparing everything again for it is what carrying was made to avoid. Checked with tests/prp_file_check.py (the C layout against make_game's reader), three launcher tests, and the exe's --prepare-shaders on a seed without records in a folder of its own: the digests it wrote are those of the seed files, one byte more in the seed reads as changed, and after preparing again it does not. A version 1 list of 42,142 variants and the same list as version 2 are both read whole by --probe-prewarm. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -263,7 +263,11 @@ The stub swaps `python.next` in while no Python runs, then starts the new versio
|
||||
game files are already unpacked builds on from them as well (`jobs.InstallJob.args`).
|
||||
7. **Prepare the Shaders** is skipped once shaders were prepared before (`shader-prepared.bin`): the game keeps using
|
||||
them and translates them again with the new translator in the background (`NX2NAVI_SHADER_CARRY`). With
|
||||
`shader_carry = 0`, or nothing prepared yet, the step prepares them all as at the install. The step still builds
|
||||
`shader_carry = 0`, or nothing prepared yet, the step prepares them all as at the install. So it does when the
|
||||
list was prepared from another shader seed than the one this kit writes: `shader-prepared.bin` carries the digests
|
||||
of the two seed files and the translator identity (`runtime/prp_file.h`), the step writes the seed first
|
||||
(`prepare_shaders.py --no-run`, seconds) and compares (`make_game.py` `seed_changed`); a list from before it
|
||||
recorded its seed is prepared again once. Another translator alone does not prepare again. The step still builds
|
||||
the prepared shaders into the graphics driver's cache again (`make_game.py` `warm_driver_cache`): seconds while
|
||||
the driver has them, 20 minutes on a player's PC when the update changed what they are built with. Its bar
|
||||
follows that count from 0 to 100 %, and the Updates row says an update takes from a few minutes to half an hour
|
||||
|
||||
Reference in New Issue
Block a user