Skip to content

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

Draft
Prime1997 wants to merge 1 commit into
ivall:mainfrom
Prime1997:contrib/bc7-reconstruction
Draft

Prime1997 wants to merge 1 commit into
ivall:mainfrom
Prime1997:contrib/bc7-reconstruction

Conversation

@Prime1997

Copy link
Copy Markdown
Contributor

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: game_scarlett_master.exe
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: game_scarlett_master.exe
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.

Keep the independent reconstruction and synthetic controls compiled only for tests. Accept the documented mode-6 configuration, zero predictors and references to preceding decoded mode-6 blocks; refuse unavailable preset history, other configurations and unsupported anchors without returning partial output. Carry the MIT fixture provenance and licence notice. This supplies a narrow block-rule prototype alongside the community entropy work in ivall#208 without activating a second DirectStorage implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant