CLI: count all SGD5 hashes and stripped-bitcode XDAT/xbop markers in shader-info #3020
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!3020
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3020"
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:32 UTC · original
fuzeofficlal:fix/cli-shader-info-coverage-xdat→main· +152 −37 · 1 files · 1 commits · openSummary
Totals::engine(HashSet<u64>) directly from parsedsgd5::databases(&data)entries inapps/victory/src/shader.rs::record_database_hashes, rather than only inside the branch where native program extraction succeeds. Fixesvictory shader-infoundercounting graphics/compute shader-pack database hash coverage for valid SGD5 entries that hold standard DXIL without native programs.XDATprefix (+0x18, matchingvictory-shader/src/native.rs::XDAT_OFFSET) andxboptrailer bytes directly from theDXILpart header inTotals::describe_dxil/dxil_trailerindependently ofDxilProgram::parse(which requires LLVM bitcode magic), so stripped-bitcode containers still report accurateXDAT prefixandxbop trailertotals and verbose flags.counts_standard_dxil_database_hashandcounts_xbox_extras_without_llvm_bitcode) covering both fixes.Verification
rustfmt --edition 2024 --check apps/victory/src/shader.rs: ok.cargo test --locked -p victory: 16 unit tests + 4 integration tests passed.cargo clippy --locked -p victory --all-targets -- -D warnings(default and--all-features): 0 warnings.cargo xtask policy: 191 files ok.b59f893c93toc3d3a03d6b@oni-swr on GitHub · 2026-11-26 05:40 UTC · original
Independent Windows x64 CPU verification of
b59f893c93db318ac33c2bf4627adb8cfbbcd5b0against its exact parent63bcca43c6a00a758510398fa43096ce7e4f7df0(Rust 1.98.1,cargo build --locked -j 4 -p victoryat both commits). All CLI inputs were synthetic. The runs used no GPU adapter.victory shader-infocheckThe head's verbose flags showed
xdat truein all three stripped cases andxbop trueonly for the two actual trailers. The third fixture putxbopinside the declared bitcode span. A separate control with three containers carrying LLVM bitcode magic gave identical counts at both commits (three bitcode programs, two XDAT prefixes, two xbop trailers).At the head,
cargo test --locked -j 4 -p victorypassed 16 unit tests and 4 integration tests, includingcounts_standard_dxil_database_hashandcounts_xbox_extras_without_llvm_bitcode. Clippy with--all-targets -- -D warningspassed with default and all features. The asset policy passed for 191 files. With rustfmt 1.9.0,rustfmt --edition 2024 --check apps/victory/src/shader.rspassed at the parent and exited 1 at the head, requesting a multilinewords(...)call in the new test helper.AI use: Claude Code (Claude Opus 5.5) created the fixtures and built and ran the exact-commit controls. Codex (gpt-6.2-sol) checked the diff, repeated the CLI comparisons with those builds and fixtures, ran the tests and tooling checks, and drafted this report.
@fuzeofficlal on GitHub · 2026-11-26 06:12 UTC · original
Thanks @oni-swr for checking! Fixed the
rustfmtline-wrap nit inapps/victory/src/shader.rsand force-pushed (rustfmt --edition 2024 --check,cargo test -p victory --locked, andcargo clippy -p victory --locked --all-targets -- -D warningsall pass).@Marvisak on GitHub · 2026-11-26 06:17 UTC · original
Automated triage for the maintainers.
Two counting fixes to
victory shader-infoinapps/victory/src/shader.rs:Totals::engineis now every hash from the parsed SGD5 databases (record_database_hashes). Onmaina hash was recorded only inside the branch where native programs were extracted, solist_pack's "shader hash in a database" lines undercounted standard-DXIL entries.describe_dxil/dxil_trailerread theXDATprefix at0x18and thexboptrailer from the DXIL part header directly, using the same offsets asDxilProgram::parseandnative.rs'sXDAT_OFFSET. Stripped-bitcode containers are therefore still counted.This is diagnostics only, with bounds-checked header reads and synthetic tests. CI
check: passing on this head. The independent verification in the thread was on the earlier headb59f893, before the rustfmt-only force-push.Generated by Claude Code
@kotekompotek on GitHub · 2026-11-26 04:39 UTC · original · approved these changes
LGTM — dxil_trailer parses the DXILProgramHeader correctly (magic@8, bitcode_offset@0x10, bitcode_size@0x14); trailer scan finds xbop after stripped bitcode; HashSet dedup of database hashes is the right container.
@Dukestar69 on GitHub · 2026-11-26 09:10 UTC · original · approved these changes
Verified against
origin/main(63bcca4):cargo test -p victory -- --test-threads=1: 16 lib + 4 integration tests passed (includingshader::tests::counts_standard_dxil_database_hashandshader::tests::counts_xbox_extras_without_llvm_bitcode).cargo clippy -p victory --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Cleanly counts all SGD5 hashes and stripped-bitcode XDAT/xbop markers in
shader-info.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@futurepro62 on GitHub · 2026-11-26 18:44 UTC · original
NVIDIA full-suite run, to go with the reports above by oni-swr, since none of them names a GPU run. Tested exact head
c3d3a03(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: 868 passed, 0 failed, 10 ignored.counts_standard_dxil_database_hash,counts_xbox_extras_without_llvm_bitcode.--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
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.