You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DirectStorage: BCPack decoder tables, lanes and BC1/BC3/BC4/BC5 - #947
Overlap:#905 covers the same ground (all BCPack modes plus the dstorage.rs wiring, in the same hle/bcpack module). This is an alternative split of the same VIctory code into small stacked PRs, opened as drafts so the two can be compared. If #905 is preferred, please close these.
Adds a BCPack decoder module, hle::bcpack, that nothing calls yet: the constant tables, the rANS
lane reader and the BC1/BC3/BC4/BC5 record decoders. BC6H, BC7 and the wiring follow in the next PRs.
Ported from VIctory (crates/victory-formats/src/bcpack.rs), used with the author's permission
(confirmation from the VIctory author to be linked in a comment); header note and THIRD_PARTY.md row added.
What is in it
hle/bcpack/mod.rs: Tables, lanes, decode for BC1, 3, 4, 5 (6 and 7 return an error), tests
hle/bcpack/tables.rs: the 77,982-byte table file as a generated Rust array (binary files are not
accepted outside tests/data/); scripts/gen_bcpack_tables.py regenerates it
hle/mod.rs, THIRD_PARTY.md: module and origin
Size: about 1,090 changed lines without tables.rs (3,255 generated), about 400 of them tests. It is
over 800 because the tables, the lane reader and the first formats only make sense together (the lane
tests need the tables, the formats need the lanes). It can be split at the lane reader if you prefer.
Tested
Windows / GPU suite: not run yet (draft until it is)
Also run on Linux x86-64, rustc 1.97, with the module in a scratch crate (xcl does not build there):
8 passed, 0 failed, 2 ignored (a benchmark, and reference_chunks, which needs real data)
Regression run: not needed (no runtime change; nothing calls the module)
Not tested:reference_chunks against real BCPack data (set VICTORY_BCPACK_TABLES / VICTORY_BCPACK_CASES); nothing on Windows yet.
AI use: Claude (Sonnet 5.5): selected and split the code, generated the tables file, wrote this text.
Lane rebuild today: head 5a19347 onto main 9aec53d, merge clean, but the build fails:
error: let chains are only allowed in Rust 2024 or later
--> crates/xcl/src/hle/bcpack/mod.rs:353:16
error: let chains are only allowed in Rust 2024 or later
--> crates/xcl/src/hle/bcpack/mod.rs:451:20
The workspace is edition = "2021" and none of #947/#948/#949/#950 bumps it, so every PR in the stack fails to build on any toolchain. Same failure in all four lanes. Fix is either an edition bump or rewriting the two && let chains.
Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
#905 is merged (67a3735): DirectStorage now unpacks BCPack BC1, BC3, BC4, BC5, BC6H and BC7 with the format's exact tables, so this PR is superseded. Thanks – this stack ported the same code; #905 already had the BC7 dictionary fix and builds on edition 2021.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a BCPack decoder module,
hle::bcpack, that nothing calls yet: the constant tables, the rANSlane reader and the BC1/BC3/BC4/BC5 record decoders. BC6H, BC7 and the wiring follow in the next PRs.
Ported from VIctory (
crates/victory-formats/src/bcpack.rs), used with the author's permission(confirmation from the VIctory author to be linked in a comment); header note and
THIRD_PARTY.mdrow added.What is in it
hle/bcpack/mod.rs:Tables, lanes,decodefor BC1, 3, 4, 5 (6 and 7 return an error), testshle/bcpack/tables.rs: the 77,982-byte table file as a generated Rust array (binary files are notaccepted outside tests/data/);
scripts/gen_bcpack_tables.pyregenerates ithle/mod.rs,THIRD_PARTY.md: module and originSize: about 1,090 changed lines without
tables.rs(3,255 generated), about 400 of them tests. It isover 800 because the tables, the lane reader and the first formats only make sense together (the lane
tests need the tables, the formats need the lanes). It can be split at the lane reader if you prefer.
Tested
8 passed, 0 failed, 2 ignored (a benchmark, and
reference_chunks, which needs real data)Regression run: not needed (no runtime change; nothing calls the module)
Not tested:
reference_chunksagainst real BCPack data (setVICTORY_BCPACK_TABLES/VICTORY_BCPACK_CASES); nothing on Windows yet.AI use: Claude (Sonnet 5.5): selected and split the code, generated the tables file, wrote this text.