formats/bcpack: strip-streaming, branchless rANS, and fast BC1-BC7 reconstruction #674
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!674
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-674"
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?
@mint17 on GitHub · 2026-11-28 03:22 UTC · original
mint17:perf/bcpack-strip-streaming→main· +2697 −693 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCOptimizes BCPack texture decoding in
crates/victory-formats/src/bcpack.rswith zerounsafecode and bit-exact parity across all 6 BC formats (clean standalone port of our mergedTaynanGT/Vice-Tay#233, preservingVIctory-NVIDIA's baseline BC7 dictionary parsing verbatim).Changes
STRIP = 256): Decodes 256 blocks per strip so intermediate symbol streams stay resident in L1 cache instead of allocating multi-megabyte full-texture scratch vectors.ModelTable: Replaces branching symbol lookup / renormalization with branchless rANS over 64-byte-aligned tables, heap-allocating large decode arrays viaalloc_boxed_arrayto avoid stack-frame bloat.unsafe.VIctory-NVIDIA's exact baseline BC7 dictionary parsing and pure LF line endings.Release Throughput Benchmark (
cargo test --release --locked -p victory-formats bcpack_throughput -- --ignored --nocapture, 16,384 blocks × 40 runs)Verification
cargo test --locked -p victory-formats(50 passed, 0 failed — includes bit-exact reference-oracle parity across BC1–BC7 and strip-boundary tests).cargo clippy -p victory-formats --all-targets --locked -- -D warnings(default +--all-features),rustfmt --check --edition 2024, andcargo test --locked -p xtask(6 passed, 0 failed, including asset policy).@Dukestar69 on GitHub · 2026-11-28 05:34 UTC · original · approved these changes
LGTM — verified on Windows:
cargo test -p victory-formats --lib bcpack::passed (15/15, including all 4 neworacle_parity_*tests across BC1–BC7 modes, rotations, subsets, strip boundaries, and malformed inputs)cargo clippy -p victory-formats --all-targets -- -D warningspassed with 0 warningscargo xtask policypassed (294 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).