BCPack: read and test the BC7 dictionary entry layout #856

Closed
github-bot wants to merge 1 commit from gh-pr/856/head into gh-pr/856/base
Owner

@⁠ettehn on GitHub · 2026-11-24 06:58 UTC · original
ettehn:bc7-dictionary-layout → main · +126 −0 · 2 files · 1 commits · closed without merging

Part of #832.

What is in it
A test-only Rust reader for 116-byte BC7 dictionary entries, based on the public format description in Marvisak/VIctory#658. It preserves bytes 52–53 and reads the two signed index arrays (16 and 15 elements). Four synthetic tests cover consecutive records, signed values, truncated input, zero-width sets and the pixel-0 anchor. The module is compiled under #[cfg(test)].

Tested
Windows 11 x64 25H2 (26200.9974), Ryzen 9 8945HX, RTX 5070 Ti Laptop (621.24), rustc 1.97.1, MSVC debug, commit b8a791e. cargo build --workspace passed. cargo test --workspace -- --test-threads=4: 717 passed, 0 failed, 41 ignored. All four new tests passed. Two tests included in the pass count reported SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.

Regression run
Retail smoke runs supplied by @⁠Anon64 on an RTX 3060 (driver 581.80), 60 seconds each. Original report.

main:

xcl-smoke v1
commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1636 (PresentX 1637)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18113 MB

PR:

xcl-smoke v1
commit: b8a791e3c7d284e38f6d5cbe44fa467d965174b4
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1631 (PresentX 1631)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 17627 MB

Not tested
No retail game was run on my machine. The reader was tested with synthetic dictionary records only. DirectStorage integration and end-to-end BC7 decompression are outside this change.

AI use
OpenAI Codex (GPT-6.2 Astra) assisted with implementation, tests and the PR description.

**@⁠ettehn** on GitHub · 2026-11-24 06:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/856) `ettehn:bc7-dictionary-layout` → `main` · +126 −0 · 2 files · 1 commits · closed without merging Part of #832. **What is in it** A test-only Rust reader for 116-byte BC7 dictionary entries, based on the public format description in Marvisak/VIctory#658. It preserves bytes 52–53 and reads the two signed index arrays (16 and 15 elements). Four synthetic tests cover consecutive records, signed values, truncated input, zero-width sets and the pixel-0 anchor. The module is compiled under `#[cfg(test)]`. **Tested** Windows 11 x64 25H2 (26200.9974), Ryzen 9 8945HX, RTX 5070 Ti Laptop (621.24), rustc 1.97.1, MSVC debug, commit `b8a791e`. `cargo build --workspace` passed. `cargo test --workspace -- --test-threads=4`: 717 passed, 0 failed, 41 ignored. All four new tests passed. Two tests included in the pass count reported SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. **Regression run** Retail smoke runs supplied by @⁠Anon64 on an RTX 3060 (driver 581.80), 60 seconds each. [Original report](https://github.com/ivall/xcl/pull/856#issuecomment-7124833311). main: ``` xcl-smoke v1 commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1636 (PresentX 1637) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18113 MB ``` PR: ``` xcl-smoke v1 commit: b8a791e3c7d284e38f6d5cbe44fa467d965174b4 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1631 (PresentX 1631) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 17627 MB ``` **Not tested** No retail game was run on my machine. The reader was tested with synthetic dictionary records only. DirectStorage integration and end-to-end BC7 decompression are outside this change. **AI use** OpenAI Codex (GPT-6.2 Astra) assisted with implementation, tests and the PR description.
Assisted-by: OpenAI Codex (GPT-6.2 Astra)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:34:41 +00:00
github-bot closed this pull request 2026-11-26 04:34:41 +00:00
Author
Owner

@⁠Anon64 on GitHub · 2026-11-24 07:17 UTC · original

Regression runs for this PR's head b8a791e and for its base main beaa245, on a retail title (same title, 60 s each), made with scripts/smoke.ps1 (release, clean tree at each commit) and pasted unedited, for Regression run.

main:

xcl-smoke v1
commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1636 (PresentX 1637)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18113 MB

this PR:

xcl-smoke v1
commit: b8a791e3c7d284e38f6d5cbe44fa467d965174b4
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1631 (PresentX 1631)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 17627 MB

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974 (native Windows), Rust 1.90.0

Not tested

  • the unit tests on this machine
  • whether the title reaches the changed code; this is a regression check only

Report written with Claude Code (Claude Opus 5.5) from runs on this machine.

**@⁠Anon64** on GitHub · 2026-11-24 07:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/856#issuecomment-7124833311) Regression runs for this PR's head `b8a791e` and for its base `main` `beaa245`, on a retail title (same title, 60 s each), made with `scripts/smoke.ps1` (release, clean tree at each commit) and pasted unedited, for **Regression run**. main: ``` xcl-smoke v1 commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1636 (PresentX 1637) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18113 MB ``` this PR: ``` xcl-smoke v1 commit: b8a791e3c7d284e38f6d5cbe44fa467d965174b4 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1631 (PresentX 1631) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 17627 MB ``` **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974 (native Windows), Rust 1.90.0 **Not tested** - the unit tests on this machine - whether the title reaches the changed code; this is a regression check only Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 07:36 UTC · original

Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, applied on main@beaa245:

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
741 passed; 0 failed; 41 ignored   (exit 0)

Four more passing tests than main on this box (737), so the BC7 dictionary entry reader and its tests run green here; nothing else changes verdict. No game data — the dictionary fixtures are synthetic.

AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

**@⁠dcastell1** on GitHub · 2026-11-24 07:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/856#issuecomment-7125165651) Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, applied on `main@beaa245`: ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 741 passed; 0 failed; 41 ignored (exit 0) ``` Four more passing tests than `main` on this box (737), so the BC7 dictionary entry reader and its tests run green here; nothing else changes verdict. No game data — the dictionary fixtures are synthetic. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 08:09 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head b8a791e onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 709 passed, 10 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes (new flake, see #718 addendum). BC7 dictionary entry layout tests green.

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.

**@⁠SlopTart** on GitHub · 2026-11-24 08:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/856#issuecomment-7125793345) Linux / AMD RDNA3 datapoint. **Merged state:** head `b8a791e` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **709 passed, 10 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of `gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes` (new flake, see #718 addendum). BC7 dictionary entry layout tests green. **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.
Author
Owner

@⁠ivall on GitHub · 2026-11-24 10:39 UTC · original

#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 – the BC7 dictionary layout of VIctory #658 is what #905 reads, and bc7_dictionary_indices_line_up holds the shipped table to it (zero-width sets, pixel-0 anchor).

**@⁠ivall** on GitHub · 2026-11-24 10:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/856#issuecomment-7129075974) #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 – the BC7 dictionary layout of VIctory #658 is what #905 reads, and `bc7_dictionary_indices_line_up` holds the shipped table to it (zero-width sets, pixel-0 anchor).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.