Repository navigation
Conversation
kotekompotek
left a comment
There was a problem hiding this comment.
Checked the nonstandard padding carefully: the D3D12 container hash puts the bit count FIRST (bytes 0-3), then data tail + 0x80, and 2*len+1 at bytes 60-63. The rewrite reproduces both cases exactly — rest < 56 single block [bitcount][rest][0x80][zeros][len<<1|1] and rest ≥ 56 with the 0x80-terminated first block then [bitcount][zeros][len<<1|1]. Round specialization uses the canonical schedule (7/12/17/22, 5/9/14/20, 4/11/16/23, 6/10/15/21). The malformed-fields test is a useful parse-coverage bonus. LGTM.
|
Reviewed and benchmarked Code review & byte-exactness
Verification & same-machine
|
|
Local verification on Windows / rustc 1.100.0 / MSVC, no game data, no GPU, no clippy/rustup, CARGO_BUILD_JOBS=2.
AI-assisted (Hy4 flash). |
|
Automated triage for the maintainers. This speeds up the DXBC container hash in CI: passing. Generated by Claude Code |
Dukestar69
left a comment
There was a problem hiding this comment.
Tested merged onto origin/main (63bcca4) on Windows 11 x64:
cargo test -p victory-shader --lib emit::container::tests: 3 passed, 0 failed, 1 ignored (odd_parts_match_wire_bytes,md5_core_matches_the_standard,dxbc_hash_padding_boundaries).cargo test -p victory-shader --lib dxbc::tests: 3 passed, 0 failed (includingreports_malformed_fields).cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Every emitted DXBC container is MD5-hashed, and the compressor previously selected word schedules and rotation amounts inside its 64-step loop while allocating a temporary buffer to finalize each digest.
What changed
crates/victory-shader/src/emit/container.rs.Benchmark (8,652-byte synthetic 5-part container, median of 5 alternating release runs)
Verification
cargo check -p victory-shader --target x86_64-pc-windows-msvc --testsand all-target Clippy-D warningspassed (default and all features).Reviewed with mistral-loop: 2 rounds with Mistral Large 4 and DeepSeek V4.1 Flash on high. Verdict: approved.
Created with gpt-6.2-astra in Codex (orchestrated with Gemini 4 Neon in T3 Code).