DirectStorage: use SIMD for zlib checksums #661
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!661
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/661/head"
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?
@CallMeBrado on GitHub · 2026-11-24 03:02 UTC · original
CallMeBrado:perf/directstorage-zlib-checksum→main· +8 −1 · 2 files · 1 commits · merged 2026-11-25 01:08 UTCThe retail title issues thousands of 64 KiB zlib reads during startup. DirectStorage already verifies the Adler-32 checksum on each inflated block. This enables the SIMD checksum implementation in the same version of
miniz_oxide.What is in it
simd-adler320.3.10 is MIT licensed. The decompressor, output limits and checksum validation stay the same.Tested
decompress_to_vec_zlib_with_limitcall that DirectStorage uses. Median of 10 runs per build, alternating order, with input in memory and 48 passes per run. On 236 distinct 64 KiB blocks from eight retail title archives, the default took 1,036.5 ms and SIMD took 976.9 ms (5.7% less time). On 128 synthetic blocks, it was 191.3 ms and 147.2 ms.cargo build --locked --workspacepassed.cargo test --locked --workspace -- --test-threads=4reported 690 passed, 0 failed, 41 ignored. Two GPU tests skipped internally for lack of wave64 (gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware).Synthetic workload for reproducing the timing
Generate the inputs once with Python 3. Use
miniz_oxide0.9.1 in a release build. Time 48 passes over the 128 streams with the default features, then withfeatures = ["simd"]. Warm each build first and keep file I/O outside the timed loop.Regression run
Main
PR
Not tested
AI use
@mastrr9 on GitHub · 2026-11-24 03:54 UTC · original
License check + NVIDIA RTX 5080 test run on
1347bea78e232e5d1ffce11b77e0c3e875ac242d:Review
Looks clean:
miniz_oxide'ssimdfeature pulls insimd-adler32 0.3.10, which is MIT-licensed (compatible with XCL'sGPL-2.0-onlylicence perCONTRIBUTING.md).Cargo.toml+Cargo.lockonly).Tested
rustc 1.100.0(MSVC), debug build.cargo build --workspace && cargo test --workspace -- --test-threads=4: 690 passed, 0 failed, 41 ignored (all DirectStorage zlib tests passed).SKIPPEDGPU tests (2, wave32-only adapter):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64.Not tested
scripts/smoke.ps1run (test suite only).AI use: licence verification and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above.
@relativespace2K on GitHub · 2026-11-24 04:06 UTC · original
Tested — native Windows, AMD CPU / RDNA2
1347bea78e232e5d1ffce11b77e0c3e875ac242d, based ondd2ae9a.Enterprise LTSC 26100; Rust 1.100.0 MSVC; DXC 1.9.2602.17; debug; no
XCL_SAMPLE_*.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4:687 passed, 3 failed, 41 ignored, 0 SKIPPED — the same counts as the base
dd2ae9a(feature/lockfile only, no new tests). The three failures are the known RDNA2 ones:
the packed-mip
3D 64x64x64 4 mips: subresource 2 mismatch(#470) and the twoPoisonErrorfollow-ons (#673).cargo test -p xcl --lib hle::dstorage: 13 passed, 0 failed, 0 ignored.cargo tree -e features -i simd-adler32confirmssimd-adler32 v0.3.10is enabledthrough
miniz_oxide feature "simd"onxcl.Not tested: the 5.7 % timing claim (no retail archive or benchmark here), release
build, Intel.
AI use: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests and drafted this report.
@MesshM on GitHub · 2026-11-24 04:14 UTC · original
Test run of
1347bea78e232e5d1ffce11b77e0c3e875ac242don AMD RDNA4. I merged it onto currentmainf4ce27clocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 701 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 660 passed, 0 failed, 21 ignoredSKIPPED; thedstoragetests pass with the SIMD checksum.Review: One Cargo feature;
simd-adler32is MIT, which is GPL-2.0-compatible, and checksum validation stays where it was. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.