DirectStorage: BCPack decoder tables, lanes and BC1/BC3/BC4/BC5 #941
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/947"
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?
Imported from ivall/xcl. Originally posted by Yeetbot159 on 2026-11-24T09:24:01Z.
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.
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T10:37:59Z.
Heads-up: this stack does not compile as-is.
Lane rebuild today: head
5a19347onto main9aec53d, merge clean, but the build fails: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&& letchains.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T10:39:41Z.
#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.upstream-sync referenced this pull request2026-11-24 19:06:45 +00:00
upstream-sync referenced this pull request2026-11-24 22:05:13 +00:00
Pull request closed