BCPack: decode BC7 dictionary blocks correctly; run unfilled indirect records empty #209
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/gamingwithhomie--larp!209
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-209"
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?
@ambrosia-works on GitHub · 2026-12-05 21:30 UTC · original
ambrosia-works:fix/bcpack-bc7-dictionary→main· +93 −12 · 4 files · 2 commits · closed without mergingSummary
Two correctness fixes ported from the cool_fox fork. Neither is GPU-vendor specific.
1. BCPack: BC7 dictionary indices were read one pixel early
Each BC7 dictionary entry stores two index widths, then 32 index words. The decoder treated the first word as padding and read only 31 indices. That shifted every stored index one pixel early. The console's decoder (GDK
BCPackDecompress) reads the first word as pixel 0's index.On the title's own streams, the old reading gave wrong output for 3.85 M of 4.70 M BC7 blocks (measured in cool_fox across 5,270 logged streams). Textures decoded through the dictionary came out subtly wrong, character textures included.
Tables::parsenow reads all 32 words.LARP_BCPACK_OLD_BC7=1keeps the old reading for A/B.bcpack.rsalready invalidates the store throughbcpack::IDENTITY, so existing caches rebuild by themselves.bc7_dictionary_indices_line_up.2. Indirect: unfilled records run empty instead of running clamped
The title leaves all ones in indirect argument slots it has not filled. Until now these were clamped and then run anyway:
DispatchMesh: dispatches over 65,535 groups (D3D12's limit; above it the behaviour is undefined) are cut to 65,535 and logged once.Verification
cargo test --release --locked -p larp-formats bcpack: passes.BCPackDecompressoutput, and the old reading does not. I ran this as a local-only test, not committed because the fixture is game data.fxc /T cs_5_1, the profile the layer uses at run time.cargo check --release --locked -p larp: no new warnings.Ported from cool_fox
7243ed8fanda9c2e911/ef556e42, the latter after victory-forkf85101b6.Pull request closed