CLI: discover compressed shader packs in archives without SGD5 or header magic #3002
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3004"
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?
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T03:09:07Z.
Summary
apps/victory/src/prebuild.rsviacollect_inputsandfind_pack.PS\0\x09files andSGD5shader files), and fall back to callingshaderpack::findon remainingDXBC-only shader files and non-shader archive files withinMAX_FILE(releasing non-shader file bytes during collection and keeping them out ofshader_files).victory translate --cache --pipelinesskipping valid archives whose shader pack lives inside 16-byte-aligned zlib streams without a leadingPS\0\x09header orSGD5marker.DXBC-plus-compressed-pack archives withoutSGD5, fast-path precedence/short-circuiting, and cleanNonehandling without pollutingshader_files.Verification
rustfmt --edition 2024 --check apps/victory/src/prebuild.rs: ok.cargo test -p victory --locked: 17 unit tests + 4 integration tests passed.cargo clippy -p victory --locked --all-targets -- -D warnings(default and--all-features): 0 warnings.cargo xtask policy: 191 files ok.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T04:40:23Z.
Review: APPROVED
LGTM — the Inputs split (direct_pack vs shader_files vs deferred other_paths) keeps the fast path cheap while letting the compressed-pack fallback scan only when needed; pack_path Cow threading is consistent.
Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-26T04:35:36Z.
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
025b12d(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 869 passed, 0 failed, 10 ignored.finds_compressed_pack_only_archive_without_polluting_shader_files,finds_compressed_pack_in_dxbc_archive_without_sgd5_magic,prefers_direct_magic_and_sgd5_fast_paths_and_returns_none_when_absent.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T05:45:36Z.
Automated triage for the maintainers.
Verdict: needs work. The refactor in
apps/victory/src/prebuild.rs(collect_inputs,find_pack) looks right as written.shaderpack::find(victory-game/src/shaderpack.rs) already inflates a pack stored as 16-byte-aligned zlib streams, so this PR only widens which filesrunhands to it: DXBC-only shader files, and then any other file underMAX_FILEthat is re-read and scanned.What's missing is evidence that this case exists.
mainlooks for the pack in files that start withPS\0\x09or are SGD5, because, as the removed comment says, it ships beside the shader databases. The PR doesn't show a real install where the pack sits in a file without either marker. The tests build synthetic archives (RPF_NO_MAGIC_HDRplus a stored zlib stream) and only show that the new search finds what they plant. If no real layout needs it, the fallback adds a second read and a zlib scan of every unrelated file whenever the pack is missing, which is the case whererunshould just print "no shader pack" and stop.To change the verdict, describe a real case where
victory translate --cache --pipelinesreported no shader pack on a valid install (file layout only, no game data) and this PR found it.CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T06:09:08Z.
Fair point from triage — I do not have a real install layout where the shader pack lives outside a
PS\0\x09file or anSGD5archive, and scanning unrelated files on a missing-pack run adds unnecessary I/O. Closing to keep the queue clean; happy to revisit if a real install layout needs it.Pull request closed