Repository navigation
bcpack: add standalone BC2/BC6H and exact BC1 reconstruction - #3293
Conversation
R0Y00
left a comment
There was a problem hiding this comment.
Independent Windows check on d049001a: built bcpack_formats_check, startup_stub_consumer and startup_stub_xcrdapi in Debug and Release. In each preset, ctest --preset <preset> --no-tests=error --output-on-failure -R '^(bcpack_all_formats|startup_bcpack_storage)' passed all three selected checks. That includes golden reconstruction, the deliberate golden mismatch, and the source-built file/memory/zlib/page storage matrix. The DirectStorage path stages the decoded output and reaches the destination only on successful decode; the fixture exercises bad final blocks and missing grants. The Python suites passed 37 methods with three optional reference skips. Docs-link and bidi checks passed. Windows 11 build 26200, MSVC 19.51. The checked-in fixture is source-built and these runs used no external decoder or local archive.
Change
BC2 and BC6H DirectStorage requests previously succeeded with blank destinations, and BC1's fitted reconstruction ignored index history. This adds standalone BC2/all fourteen BC6H modes and replaces BC1 with independent endpoint/index history plus exact format dictionaries/ranks. The fitted window and masks are removed. All seven formats share the existing atomic file/memory/zlib/page publication path; invalid formats and damaged streams fail without publishing blank or partial textures.
Fixes #3274. Related #1940 adds diagnostics separately; its inspector format list needs BC2/BC6H when the branches are integrated. This PR does not depend on it.
Normal runtime and regression tests require no GDK, BCPack.dll or external table file. New synthetic golden/storage checks are included in the PR build/test presets. README, startup documentation and
docs/experiments/bcpack-standalone.mddescribe the capability, provenance, reproduction and limits.Verification
Tested commit
d049001ab9a906588f47868277b77e9a00e27053, based on mainfd7ce57a63acdfc0a946c22c37ae7568b0b3ee4c. Windows 10 x64 build 19045, Ryzen 7 7700, MSVC 19.43, Python 3.14. No GPU tests were used for this CPU decoder change.After
./tools/dev.ps1and configuring each preset withINTAKE_PYTHONpointing to Python 3.14, the following build/test commands were run for bothdevandrelease:Results: 12/12 passed in Debug, 12/12 passed in Release; no CTest capability skips. The expected-failure controls returned failure as required.
Results: 37 Python test methods passed; 3 optional external-reference methods skipped. The table JSON reference was absent (1 skip), and an optional external strict decoder was absent (2 skips). Documentation links, bidi and whitespace checks passed.
The golden fixture generates 12,330 synthetic streams, checks fixed independent oracle output hashes, compares reference/scalar/AVX2 bytes, and checks output guards. It exercises initial references 0–255, independent endpoint/index references, all BC6H modes/partitions, mapped BC7 controls, mixed modes and history wrap. Truncation, output misalignment, trailing input and invalid modes/formats are failure controls. The storage fixture checks 26 scenarios, including file/memory, outer zlib, cross-page destinations, missing grants, invalid formats and a bad final BC6H block after three valid blocks; following valid requests must succeed.
The unchanged
synthetic_11BC1 input's previous 512-byte golden was independently wrong in 491 bytes. Its first eight bytes were85 31 64 d5 af be ff bf; the oracle gives8d 73 0a 07 ea b8 fa be. The test now checks the complete corrected output; input and malformed-input controls remain intact.Evidence and limits
dumpbin /dependents out/build/release/XCRDAPI.dlllists onlyKERNEL32.dll; the runtime has no SDK decoder dependency.AI-assisted implementation and documentation. The local tests and comparisons above were executed, not inferred.
Checklist