Repository navigation
RT-BINK-PACKAGE-CACHE: use the selected installation for named movie playback - #8432
Raxstreams wants to merge 2 commits into
Conversation
|
Identifying the package by path (equivalent() at runtime/test/bink_play.cpp:251, :254) is cheap and fixes the cross-install case; check_bink_cache_source.py (Python 3.11, against bink_play.exe built from this PR on Windows 11) passes, and fails on a pre-PR build (the foreign-archive case), so it guards that. Gap: files replaced at the same path are still accepted, though the stamp already carries what's needed:
So after an in-place package update (a new common.rpf, or a same-size movies.rpf), tools/bink_play.py's stamp() key goes stale but the native reader keeps the old names/offsets without rebuilding (reproduced with synthetic files). Comparing all the stamp fields (file_size, plus mtime via GetFileAttributesExW converted to Unix ns to match st_mtime_ns) stays stat-only; a "replaced mount" case in check_bink_cache_source.py would pin it. AI-assisted (Claude Code). |
|
@Envyre Thanks for testing both cases. |
|
I tested the movie-name cache on Windows 11 NTFS at
The registered AI-assisted. |
|
Tested Configured
AI-assisted (Claude Code). Synthetic tests only, no game files. |
|
Tested 47f7e05 merged onto main (867d922) on AMD Radeon RX 9070 XT, Adrenalin 26.11.1 (LLPC / Vulkan 1.4.359), Windows 11:
|
|
Tested
AI-assisted (Claude Code). |
Claimed in the coordination issue as: RT-BINK-PACKAGE-CACHE
What and why
Named playback could look up a movie in one installation and load the decoder from another. The native player accepted the shared name table whenever its recorded archive still had the expected size, even if the user selected a different game folder.
Check that both files recorded by the Python indexer are the selected folder's
movies.rpfandcommon.rpfbefore using any cached offset. On a mismatch, rebuild for the selected folder, require the helper to succeed, and check the new table before lookup. A game folder ending in a backslash works when passed to the helper. Launching without a selected folder still uses the cached installation.Tested
Windows 11 Home (build 26200), MSVC 19.44, Python 3.14.2, GeForce RTX 3080 Ti (617.14). The movie playback checks used headless CPU decoding.
bink_play_headlessCTest also passed (30 frames), as did all nine Python name-cache tests.d3d12_vulkan_deviceandd3d12_depth_resolvealso failed when built and run from the unpatched baseline on the same machine.test_image_atomics_guard,test_image_store_d16). Both failing files also failed on the unpatched baseline. tests: fix image atomics guard and image_store d16 tests after #4473 and #6805 #7608 tracks them.python -I make_game.py --help,git diff --check, andpython -I scripts/check_no_game_data.pyon all four changed files passed.AI-assisted: yes, with Codex.
Checklist
Review follow-up
47f7e05d9compares the size and nanosecond modification time of both source files against the Python indexer's cache stamp, including when the cache supplies the package path. The previous head accepted the table after a same-size archive update. The updatedbink_play_cache_sourceCTest passed with same-size archive and mount updates, a mount size change with its timestamp preserved, and a missing cached mount. The nine Python name-cache tests also passed. These follow-up tests used synthetic inputs.