DirectStorage: prototype documented BC7 mode-6 block reconstruction #433

Closed
Prime1997 wants to merge 1 commit from upstream-pr/438 into main
Prime1997 commented 2026-11-24 00:16:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-24T00:16:43Z.


Adds an independently implemented, CPU-only reference for one documented BC7 mode-6 block configuration. The input is sixteen decoded symbol lanes. This gives #208 a tested reconstruction rule for a subset of its output. #233 and #273 handle BC1, and #340 covers BC3/4/5.

What is in it

  • crates/xcl/src/hle/bcpack_bc7.rs reconstructs the documented unrotated mode-6 configuration from decoded lanes, including zero and available same-mode history. Four synthetic tests cover fixed one- and two-block outputs and rejection paths.
  • crates/xcl/src/hle/mod.rs includes the reference under cfg(test). THIRD_PARTY.md and the module identify the MIT-licensed fixture sources. DirectStorage integration and broader mode support remain separate.

Tested

  • Windows 11 Pro build 26200, Intel Core i5-10400, GeForce RTX 3060 Ti (driver 32.0.16.1714), Rust 1.100.0.
  • Tested commit bf0ad870d921251b614c23e8afdf5b3bb8cd550e with cargo build --locked --workspace and cargo test --workspace --no-fail-fast -- --test-threads=4 (debug). 680 passed, 0 failed, 41 ignored. 2 GPU tests reported a skip.
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
  • An earlier parallel suite run on the SSE4a test branch failed at the shared-page cubemap assertion and poisoned its test lock. We also reproduced that assertion on unmodified a6f5f7a in isolation on this GPU.
  • The four mode-6 CPU checks passed with cargo test --locked -p xcl --lib bcpack_bc7 -- --test-threads=1 --nocapture. Built the PR with cargo build --locked --release --workspace and main with cargo build --locked --release -p xcl.

Regression run

Both release builds ran the same title offline from a fresh title-data directory. The retail runs check startup. The synthetic controls exercise the new code.

Main

xcl-smoke v1
commit: a6f5f7a74cc620c1f88a9e3669a633d10c3c8212
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 235 (PresentX 235)
presents per 2 s (last 3): 9 10 9
device removals: 0
crashes: 0
peak commit: 15196 MB

PR

xcl-smoke v1
commit: bf0ad870d921251b614c23e8afdf5b3bb8cd550e
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 231 (PresentX 232)
presents per 2 s (last 3): 7 7 8
device removals: 0
crashes: 0
peak commit: 15175 MB

Not tested

Retail BC7 reconstruction, initial preset history, other configurations, comparison with console hardware, and AMD or Intel GPUs. Optional sample-data tests ran without external sample files.

AI use

OpenAI Codex (GPT-6) assisted with the independent reconstruction, tests, provenance and overlap checks, and validation.

I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord

<!-- greyfinch-sync:ivall/xcl:issue:6571639631 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/438). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-24T00:16:43Z. --- Adds an independently implemented, CPU-only reference for one documented BC7 mode-6 block configuration. The input is sixteen decoded symbol lanes. This gives #208 a tested reconstruction rule for a subset of its output. #233 and #273 handle BC1, and #340 covers BC3/4/5. **What is in it** - `crates/xcl/src/hle/bcpack_bc7.rs` reconstructs the documented unrotated mode-6 configuration from decoded lanes, including zero and available same-mode history. Four synthetic tests cover fixed one- and two-block outputs and rejection paths. - `crates/xcl/src/hle/mod.rs` includes the reference under `cfg(test)`. `THIRD_PARTY.md` and the module identify the MIT-licensed fixture sources. DirectStorage integration and broader mode support remain separate. **Tested** - Windows 11 Pro build 26200, Intel Core i5-10400, GeForce RTX 3060 Ti (driver 32.0.16.1714), Rust 1.100.0. - Tested commit `bf0ad870d921251b614c23e8afdf5b3bb8cd550e` with `cargo build --locked --workspace` and `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug). 680 passed, 0 failed, 41 ignored. 2 GPU tests reported a skip. - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64` - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` - An earlier parallel suite run on the SSE4a test branch failed at the shared-page cubemap assertion and poisoned its test lock. We also reproduced that assertion on unmodified `a6f5f7a` in isolation on this GPU. - The four mode-6 CPU checks passed with `cargo test --locked -p xcl --lib bcpack_bc7 -- --test-threads=1 --nocapture`. Built the PR with `cargo build --locked --release --workspace` and main with `cargo build --locked --release -p xcl`. **Regression run** Both release builds ran the same title offline from a fresh title-data directory. The retail runs check startup. The synthetic controls exercise the new code. Main ``` xcl-smoke v1 commit: a6f5f7a74cc620c1f88a9e3669a633d10c3c8212 gpu: NVIDIA GeForce RTX 3060 Ti title: 419239bf seconds: 60 exit: 0x0 frames shown: 235 (PresentX 235) presents per 2 s (last 3): 9 10 9 device removals: 0 crashes: 0 peak commit: 15196 MB ``` PR ``` xcl-smoke v1 commit: bf0ad870d921251b614c23e8afdf5b3bb8cd550e gpu: NVIDIA GeForce RTX 3060 Ti title: 419239bf seconds: 60 exit: 0x0 frames shown: 231 (PresentX 232) presents per 2 s (last 3): 7 7 8 device removals: 0 crashes: 0 peak commit: 15175 MB ``` **Not tested** Retail BC7 reconstruction, initial preset history, other configurations, comparison with console hardware, and AMD or Intel GPUs. Optional sample-data tests ran without external sample files. **AI use** OpenAI Codex (GPT-6) assisted with the independent reconstruction, tests, provenance and overlap checks, and validation. I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. [Test coordination on Discord](https://discord.gg/gK3y7WRRY)
Abuudiii commented 2026-11-24 07:06:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Abuudiii on 2026-11-24T06:58:56Z.


Independent synthetic mode-6 check on exact head bf0ad870d921251b614c23e8afdf5b3bb8cd550e (Arch Linux, GE-Proton 11-7, Rust 1.99.1 Windows GNU debug build).

Tested: Built the library unit-test executable with cargo test --locked --offline -p xcl --lib --target x86_64-pc-windows-gnu --no-run, then ran filter bcpack_bc7 with --test-threads=1 --nocapture: 4 passed, 0 failed, 0 ignored. This exercised byte-exact one- and two-block assembly, same-stream prediction, and the existing refusal checks on synthetic decoded lanes.

Not tested: rANS input, preset dictionary prediction, DirectStorage wiring, native Windows, or retail. No game assets or GPU were needed.

AI use: omp (GPT-6.2 Sol) ran the check and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7124489529 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/438#issuecomment-7124489529). Originally posted by [Abuudiii](https://github.com/Abuudiii) on 2026-11-24T06:58:56Z. --- Independent synthetic mode-6 check on exact head `bf0ad870d921251b614c23e8afdf5b3bb8cd550e` (Arch Linux, GE-Proton 11-7, Rust 1.99.1 Windows GNU debug build). **Tested:** Built the library unit-test executable with `cargo test --locked --offline -p xcl --lib --target x86_64-pc-windows-gnu --no-run`, then ran filter `bcpack_bc7` with `--test-threads=1 --nocapture`: **4 passed, 0 failed, 0 ignored**. This exercised byte-exact one- and two-block assembly, same-stream prediction, and the existing refusal checks on synthetic decoded lanes. **Not tested:** rANS input, preset dictionary prediction, DirectStorage wiring, native Windows, or retail. No game assets or GPU were needed. **AI use:** omp (GPT-6.2 Sol) ran the check and drafted this report.
upstream-sync closed this pull request 2026-11-24 11:04:43 +00:00
ivall commented 2026-11-24 11:05:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T10:39:36Z.


#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 – BC7 (all its modes) is decoded there.

<!-- greyfinch-sync:ivall/xcl:comment:7129075146 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/438#issuecomment-7129075146). Originally posted by [ivall](https://github.com/ivall) on 2026-11-24T10:39:36Z. --- #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 – BC7 (all its modes) is decoded there.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!433
No description provided.