HLE & Formats: replace miniz_oxide with SIMD-accelerated zlib-rs #1355
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!1355
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1355"
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?
@wbkepler on GitHub · 2026-11-24 17:35 UTC · original
wbkepler:hle/simd-zlib-decompression→main· +304 −50 · 10 files · 1 commits · openSummary
Replaces scalar
miniz_oxideacross the workspace with pure-Rust, Zlib-licensedzlib-rs = "0.6.8"(default-features = false, features = ["std"], runtime AVX2/BMI2/SSE4.2 dispatch, zero C compiler/libc, zero newunsafe):victory-hle(dstorage.rs): Reuses a thread-localzlib_rs::Inflatestate per DirectStorage worker thread, handling empty destinations and preserving short-stream tolerance plusINVALID_DATArejection on oversized, truncated, or bad-checksum streams.victory-shader(native.rsXBCH) &victory-game(sgd5.rsraw deflate): Incremental streamingzlib_rs::Inflatecapped at declared unpacked size with exactStatus::StreamEndand length verification.victory-gpu(capture.rs): Switches diagnostic PNG IDAT compression tozlib_rs::compress_slice, removingminiz_oxidecompletely fromCargo.toml/Cargo.lock.dstorage,native, andsgd5.Verification
cargo clippy --workspace --all-targets&-p victory --features diagnostics --all-targets— passed (0 new warnings)cargo test --workspace— passedcargo xtask policy— passed (151 files ok)@Marvisak on GitHub · 2026-11-25 01:23 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-game/src/sgd5.rs,crates/victory-shader/src/native.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
@sinan-cmyk on GitHub · 2026-11-25 01:48 UTC · original
Offline measurement on a retail dump, and the shader tests on Ada
Result: no count change against
main.Offline. I merged head
2e60202ontomainffe310e(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 21,724 onmain, 21,724 with this PR.No program changes its failure reason either. That is the expected result for a fix whose instructions sit behind the earlier failures on
main. The count shows that the change rejects nothing. It does not show whether the output is right.Tests: with the same merge,
cargo test --locked -p victory-shader --libpassed 121, failed 0. The bitcode benchmark is ignored, as onmain, where 120 pass. The run was on an RTX 4070 SUPER (Ada, 32-lane waves, driver 32.0.16.1088), the default adapter, withVICTORY_WARPunset.No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
@Headache3318 on GitHub · 2026-11-25 01:50 UTC · original
Tested on Linux (Arch, kernel 7.3.5, 3× RTX 4090 driver 620.73.04), Rust 1.98.1 (pinned). PR head
2e60202applied cleanly onto currentmainccfb029.cargo test -p victory-game --locked: 3 passed (the new zlib-rs streaming tests pass on Linux).cargo test -p victory-shader --locked: 57 passed (fewer than main because GPU tests are skipped without dxil.dll).cargo clippy -p victory-shader --all-targets -- -D warnings: 1 new unused-function error in test code (constant_color), but main has 4 pre-existing errors (unused imports, unused variable, dead field). The PR net-reduces clippy errors from 4 to 1.cargo clippy --workspace --all-targets -- -D warnings: fails on victory-gpu (E0425) on Linux — same as main. This PR does not fix the Linux build.Not tested: Windows MSVC build, the title itself. AI-assisted.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.