CLI: discover compressed shader packs in archives without SGD5 or header magic #3004
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3004
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@fuzeofficlal on GitHub · 2026-11-26 03:09 UTC · original
fuzeofficlal:fix/cli-prebuild-compressed-pack→main· +242 −18 · 1 files · 1 commits · closed without mergingSummary
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.@futurepro62 on GitHub · 2026-11-26 04:35 UTC · original
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
@Marvisak on GitHub · 2026-11-26 05:45 UTC · original
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
@fuzeofficlal on GitHub · 2026-11-26 06:09 UTC · original
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