bcpack: decode BC7 from packed indices behind VICTORY_BCPACK_FAST_BC7 #56
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ReTerryDavis--ReVIctory!56
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-55"
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?
@SovietBearz0r on GitHub · 2026-12-04 21:01 UTC · original
SovietBearz0r:pr/bc7-fast→main· +398 −0 · 2 files · 1 commits · merged 2026-12-04 21:39 UTCBC7 blocks are rebuilt from 16-bit index words, one pixel at a time. This adds a second decoder that keeps the indices packed in 64-bit fields, works out each control word's field layout once, and assembles a block with a pass of shifts and
pext— same bytes, less work per pixel.Opt-in:
VICTORY_BCPACK_FAST_BC7=1, x86_64 with BMI2 only; without it the existing lane decoder runs exactly as before. It is not on by default because it has not been measured on the title's texture streams yet.This is the
bc7_fast.rspiece from the closed #14, ported to currentmainas its own change: the file, aOnceLockof the packed controls and dictionary inTables, and one branch indecode_with.Verified
cargo test -p victory-formats— 45 passed, 6 ignored; the bcpack subset also passes withVICTORY_BCPACK_FAST_BC7=1.packed_bc7_matches_the_lane_decoder: 4,096 varied records decode byte-identically, and both paths refuse the same unused control codes.cargo clippy -p victory-formats --all-targets -- -D warnings: clean.cargo xtask policy: ok.Not done: an FPS or steady-state measurement on the title's texture streams. The block output is identical by construction; the difference is decode time.