DirectStorage: BCPack entropy stage for all modes, not yet called #208

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

@⁠Kalmarv on GitHub · 2026-11-23 20:58 UTC · original
Kalmarv:feat/bcpack-decoder → main · +1143 −0 · 35 files · 1 commits · closed without merging

The entropy stage of a BCPack decoder, for six of the seven modes, with its tests. Nothing calls it yet: DirectStorage still refuses every request with a BCPack stage (DSTORAGE_BCPACK_MODE) and counts it as main does. The BC1 block rebuild and the DirectStorage wiring are in the PR stacked on this one (#273). This PR is the first half of its earlier form, which had both. The split keeps the stage that no format-specific rule depends on apart from the BC1 rebuild, which depends on estimated tables.

Builds on #201 (merged). One commit, 42c90e0, on main 9ce2070 (rebased from 34c0ee5 on 9ab7d76; no conflict, and no line of the commit changed).

What is in it

  • hle/bcpack/lanes.rs: the lane decoder. A stream has no header: 12 lanes (BC1, BC3, BC4, BC5) or 16 (BC6H, BC7) of rANS share one byte stream, one symbol per lane for every 8 bytes of output. The lane is a port of the decoder module of Microsoft's silicon-rans sample (mdu_minirans.v at 2f6827d, MIT): same registers, same two clock phases, same control states. The sample leaves out the byte feeder and the symbol vector. Those two rules (requesting lanes served in lane order, eight bytes a clock; symbols released together) follow the format notes of bcpack-decoder and bcpack-rs, both MIT. No code was taken from either. The file's header names all three, with URL and licence.
  • hle/bcpack/rans_tables.rs: the 128 static models.
    • It is generated, not written: python scripts/gen_bcpack_tables.py <mdu_minirans.v> (the script is in this PR) reads the sample's frequency tables and writes the file.
    • It also checks that the sample's cumulative bases follow from the frequencies, and that its reciprocal tables give the same symbol as plain division for every slot of every model; that is why the decoder divides.
  • hle/bcpack/mod.rs: lane_widths(mode) and decode_lanes(mode, bytes, len), the module's errors (truncated, stuck, end state, trailing data, …). The module docs say that nothing calls it yet.
  • hle/bcpack/tests.rs, tests/data/bcpack/: tests and fixtures, below. tests/data/bcpack/generate.py is the fixtures' encoder.
  • THIRD_PARTY.md: a row for silicon-rans (the lane port and the generated tables), and one for the two projects' format notes (no code; the stream layout, lane widths and byte feeder rule).

Tested

  • RTX 5070 Ti, NVIDIA 610.74, Ryzen 9 9950X, Windows 11 Pro 25H2 (build 26200.9711), Rust 1.99.0, debug build.

  • cargo test --workspace -- --test-threads=4 on 42c90e0: 688 passed, 0 failed, 41 ignored (the xcl library: 648 passed, 21 ignored). SKIPPED GPU tests: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware, both "no wave64".

  • cargo test -p xcl --lib bcpack on 42c90e0: 7 passed, 0 failed. These are the four tests below and main's three BCPack refusal tests in dstorage, which pass unchanged since nothing here is called. cargo build -p xcl gives one warning, in hle/xgameruntime/mod.rs, which this PR does not touch.

  • What the tests show is agreement with independent readings of the same public material. Nothing here was compared with what a console writes.

    • fixtures_decode_to_their_lanes: 13 streams (BC1, BC3, BC4, BC5, BC6H, BC7; up to 64 KiB of output) decode to their symbols. They come from an encoder that a second person wrote from the format notes without seeing this decoder (tests/data/bcpack/generate.py). All are synthetic. Zero padding after a stream is accepted and other trailing bytes are refused. One fixture's states are cut shorter than an encoder can cut them, and it is refused: bcpack-decoder accepts it, the hardware sample and bcpack-rs don't.
    • model_matches_the_patent_excerpt: a model's slots against the numbers printed in US 11,234,023, and all 128 models sum to 65536.
    • random_streams_round_trip_in_every_model: streams from the test's own encoder, in every model, with narrowed widths, 2- and 3-byte headers, and several fragments per lane.
    • damaged_streams_end_cleanly: every cut stream fails. Mutated and random bytes end without a panic or a hang. Uniform models have no redundancy, so damage there can't always be noticed.
  • 360 random streams from the test encoder were also decoded outside the tests by the two published decoders:

    • bcpack-rs: the same symbols on 360 of 360.
    • bcpack-decoder's CLI: the same symbols on 178, and an error on the other 182. All 182 are streams where a lane has more than one fragment; with one fragment per lane it gives 360 of 360.

    So the two published decoders differ on such synthetic streams. This one sides with the hardware sample and bcpack-rs; which one a console agrees with is not known from here.

  • Mutations of the earlier form, each failing at least one of these tests: feed window 8 → 7, no lockstep, slot 0 not reserved, 3-byte length off by one, no state reset at a flush, end state unchecked. The earlier form's other five mutations concern the BC1 rebuild and the wiring and go with the stacked PR.

  • Speed, measured by the reviewer on the earlier form: 64 KiB of output in 0.61 ms (about 100 MiB/s) on one thread. The decoder runs clock by clock like the hardware, which is the simple and checkable form, not the fast one.

Known to be assumed:

  • A lane's last symbol must leave the state its encoder started from (2²⁴, or that with one or two zero bytes dropped), also at a fragment that resets the state. The hardware sample does not check the second case; a stream that fails it has lost symbols.
  • One stream unpacks to the length the caller gives; zero padding may follow it, anything else is refused (trailing data).

Why only the entropy stage for BC3–BC7: how their symbols map to block bits is not published in a form XCL can use. The two MIT projects document it for BC1 only, and that rebuild is the stacked PR. The one public BC7 rebuild I know of is GPL-3.0, which XCL (GPL-2.0-only) can't take; it was not read for this PR. No lane layout is published for BC2.

source licence used for
microsoft/silicon-rans mdu_minirans.v (2f6827d) MIT lane decoder (port), model tables (generated)
Tim0219800/bcpack-decoder docs/SPEC.md (d2cb8f3) MIT format facts, no code
Ahmet-Dedeler/bcpack-rs docs/BCPACK_SPEC.md (c51ec52) MIT format facts, no code

Patent: US 11,234,023 (Microsoft) describes this interleaved rANS design. The sample's MIT licence does not mention patents. I'm noting it so you can decide; nothing in the code depends on the patent's text.

Overlaps:

  • #233 (@⁠Yeetbot159) adds opt-in BC1 decoding (XCL_DSTORAGE_BCPACK_BC1=1) in the same hle/dstorage.rs. It uses the bcpack-rs crate as a dependency (pinned to c51ec52, MIT) and also changes the window title (present.rs, pso_async.rs). This PR differs in scope:

    • it adds no dependency and carries its own decoder, credited in the files and in THIRD_PARTY.md;
    • it covers the entropy stage for all six modes, not BC1 only;
    • it changes nothing in dstorage.rs.

    The stacked PR is the one that meets #233 in dstorage.rs, and the differences there are listed in it.

  • #289 (@⁠theaustinayers), the physical-page destination write in hle/dstorage.rs, is merged and is in 9ce2070. This PR does not touch that file.

  • #340 (@⁠NiiRoZz, BC3 / BC4 / BC5 block rebuilds) is stacked on this PR's and #273's earlier heads (34c0ee5, 5f12643), so it needs a rebase onto the new ones. #438 (@⁠Prime1997, a BC7 mode-6 prototype) adds its own file and merges with 42c90e0 without conflicts (git merge-tree).

  • HANDOFF.md ("BCPack (and other console formats) are refused") stays right with this PR alone.

Regression run

Our own runs, one after the other on the machine under Tested (RTX 5070 Ti), release builds, no uncommitted changes.

main:

xcl-smoke v1
commit: 9ce2070eccf436d7bd38601c90407da447df34f3
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1594 (PresentX 1594)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14545 MB

PR:

xcl-smoke v1
commit: 42c90e0b0499db3ad373925fa164ee1f1907c791
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1608 (PresentX 1608)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14418 MB

Not tested

  • What a title does with BCPack: nothing in this PR is called at run time, so the smoke runs above are a regression check only.
  • No retail or hardware comparison of the entropy stage itself. The retail run on this thread was of the earlier form with the BC1 wiring, and it is cited in the stacked PR.
  • No GPU involvement; the GPU tests in the workspace run are main's.
  • The block rebuild of any format (the stacked PR does BC1).
  • A stream that spans several requests, or several streams in one request, if titles do that.

AI use

  • Claude Code (Claude Fable 5.2), the decoder, tests and first description; Codex (GPT-6.2 Astra), the independent fixtures' encoder and a review; Claude Code (Claude Opus 5.5), the split and this description
**@⁠Kalmarv** on GitHub · 2026-11-23 20:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/208) `Kalmarv:feat/bcpack-decoder` → `main` · +1143 −0 · 35 files · 1 commits · closed without merging The entropy stage of a BCPack decoder, for six of the seven modes, with its tests. Nothing calls it yet: DirectStorage still refuses every request with a BCPack stage (`DSTORAGE_BCPACK_MODE`) and counts it as `main` does. The BC1 block rebuild and the DirectStorage wiring are in the PR stacked on this one (#273). This PR is the first half of its earlier form, which had both. The split keeps the stage that no format-specific rule depends on apart from the BC1 rebuild, which depends on estimated tables. Builds on #201 (merged). One commit, `42c90e0`, on `main` `9ce2070` (rebased from `34c0ee5` on `9ab7d76`; no conflict, and no line of the commit changed). **What is in it** - `hle/bcpack/lanes.rs`: the lane decoder. A stream has no header: 12 lanes (BC1, BC3, BC4, BC5) or 16 (BC6H, BC7) of rANS share one byte stream, one symbol per lane for every 8 bytes of output. The lane is a port of the `decoder` module of Microsoft's [silicon-rans](https://github.com/microsoft/silicon-rans) sample (`mdu_minirans.v` at 2f6827d, MIT): same registers, same two clock phases, same control states. The sample leaves out the byte feeder and the symbol vector. Those two rules (requesting lanes served in lane order, eight bytes a clock; symbols released together) follow the format notes of [bcpack-decoder](https://github.com/Tim0219800/bcpack-decoder) and [bcpack-rs](https://github.com/Ahmet-Dedeler/bcpack-rs), both MIT. No code was taken from either. The file's header names all three, with URL and licence. - `hle/bcpack/rans_tables.rs`: the 128 static models. - It is generated, not written: `python scripts/gen_bcpack_tables.py <mdu_minirans.v>` (the script is in this PR) reads the sample's frequency tables and writes the file. - It also checks that the sample's cumulative bases follow from the frequencies, and that its reciprocal tables give the same symbol as plain division for every slot of every model; that is why the decoder divides. - `hle/bcpack/mod.rs`: `lane_widths(mode)` and `decode_lanes(mode, bytes, len)`, the module's errors (`truncated`, `stuck`, `end state`, `trailing data`, …). The module docs say that nothing calls it yet. - `hle/bcpack/tests.rs`, `tests/data/bcpack/`: tests and fixtures, below. `tests/data/bcpack/generate.py` is the fixtures' encoder. - `THIRD_PARTY.md`: a row for silicon-rans (the lane port and the generated tables), and one for the two projects' format notes (no code; the stream layout, lane widths and byte feeder rule). **Tested** - RTX 5070 Ti, NVIDIA 610.74, Ryzen 9 9950X, Windows 11 Pro 25H2 (build 26200.9711), Rust 1.99.0, debug build. - `cargo test --workspace -- --test-threads=4` on `42c90e0`: 688 passed, 0 failed, 41 ignored (the `xcl` library: 648 passed, 21 ignored). SKIPPED GPU tests: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`, both "no wave64". - `cargo test -p xcl --lib bcpack` on `42c90e0`: 7 passed, 0 failed. These are the four tests below and `main`'s three BCPack refusal tests in `dstorage`, which pass unchanged since nothing here is called. `cargo build -p xcl` gives one warning, in `hle/xgameruntime/mod.rs`, which this PR does not touch. - What the tests show is agreement with independent readings of the same public material. Nothing here was compared with what a console writes. - `fixtures_decode_to_their_lanes`: 13 streams (BC1, BC3, BC4, BC5, BC6H, BC7; up to 64 KiB of output) decode to their symbols. They come from an encoder that a second person wrote from the format notes without seeing this decoder (`tests/data/bcpack/generate.py`). All are synthetic. Zero padding after a stream is accepted and other trailing bytes are refused. One fixture's states are cut shorter than an encoder can cut them, and it is refused: bcpack-decoder accepts it, the hardware sample and bcpack-rs don't. - `model_matches_the_patent_excerpt`: a model's slots against the numbers printed in US 11,234,023, and all 128 models sum to 65536. - `random_streams_round_trip_in_every_model`: streams from the test's own encoder, in every model, with narrowed widths, 2- and 3-byte headers, and several fragments per lane. - `damaged_streams_end_cleanly`: every cut stream fails. Mutated and random bytes end without a panic or a hang. Uniform models have no redundancy, so damage there can't always be noticed. - 360 random streams from the test encoder were also decoded outside the tests by the two published decoders: - bcpack-rs: the same symbols on 360 of 360. - bcpack-decoder's CLI: the same symbols on 178, and an error on the other 182. All 182 are streams where a lane has more than one fragment; with one fragment per lane it gives 360 of 360. So the two published decoders differ on such synthetic streams. This one sides with the hardware sample and bcpack-rs; which one a console agrees with is not known from here. - Mutations of the earlier form, each failing at least one of these tests: feed window 8 → 7, no lockstep, slot 0 not reserved, 3-byte length off by one, no state reset at a flush, end state unchecked. The earlier form's other five mutations concern the BC1 rebuild and the wiring and go with the stacked PR. - Speed, measured by the reviewer on the earlier form: 64 KiB of output in 0.61 ms (about 100 MiB/s) on one thread. The decoder runs clock by clock like the hardware, which is the simple and checkable form, not the fast one. Known to be assumed: - A lane's last symbol must leave the state its encoder started from (2²⁴, or that with one or two zero bytes dropped), also at a fragment that resets the state. The hardware sample does not check the second case; a stream that fails it has lost symbols. - One stream unpacks to the length the caller gives; zero padding may follow it, anything else is refused (`trailing data`). Why only the entropy stage for BC3–BC7: how their symbols map to block bits is not published in a form XCL can use. The two MIT projects document it for BC1 only, and that rebuild is the stacked PR. The one public BC7 rebuild I know of is GPL-3.0, which XCL (GPL-2.0-only) can't take; it was not read for this PR. No lane layout is published for BC2. | source | licence | used for | |---|---|---| | microsoft/silicon-rans `mdu_minirans.v` (2f6827d) | MIT | lane decoder (port), model tables (generated) | | Tim0219800/bcpack-decoder `docs/SPEC.md` (d2cb8f3) | MIT | format facts, no code | | Ahmet-Dedeler/bcpack-rs `docs/BCPACK_SPEC.md` (c51ec52) | MIT | format facts, no code | Patent: US 11,234,023 (Microsoft) describes this interleaved rANS design. The sample's MIT licence does not mention patents. I'm noting it so you can decide; nothing in the code depends on the patent's text. Overlaps: - **#233** (@⁠Yeetbot159) adds opt-in BC1 decoding (`XCL_DSTORAGE_BCPACK_BC1=1`) in the same `hle/dstorage.rs`. It uses the bcpack-rs crate as a dependency (pinned to c51ec52, MIT) and also changes the window title (`present.rs`, `pso_async.rs`). This PR differs in scope: - it adds no dependency and carries its own decoder, credited in the files and in `THIRD_PARTY.md`; - it covers the entropy stage for all six modes, not BC1 only; - it changes nothing in `dstorage.rs`. The stacked PR is the one that meets #233 in `dstorage.rs`, and the differences there are listed in it. - **#289** (@⁠theaustinayers), the physical-page destination write in `hle/dstorage.rs`, is merged and is in `9ce2070`. This PR does not touch that file. - **#340** (@⁠NiiRoZz, BC3 / BC4 / BC5 block rebuilds) is stacked on this PR's and #273's earlier heads (`34c0ee5`, `5f12643`), so it needs a rebase onto the new ones. **#438** (@⁠Prime1997, a BC7 mode-6 prototype) adds its own file and merges with `42c90e0` without conflicts (`git merge-tree`). - `HANDOFF.md` ("BCPack (and other console formats) are refused") stays right with this PR alone. **Regression run** Our own runs, one after the other on the machine under **Tested** (RTX 5070 Ti), release builds, no uncommitted changes. main: ``` xcl-smoke v1 commit: 9ce2070eccf436d7bd38601c90407da447df34f3 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1594 (PresentX 1594) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14545 MB ``` PR: ``` xcl-smoke v1 commit: 42c90e0b0499db3ad373925fa164ee1f1907c791 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1608 (PresentX 1608) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14418 MB ``` **Not tested** - What a title does with BCPack: nothing in this PR is called at run time, so the smoke runs above are a regression check only. - No retail or hardware comparison of the entropy stage itself. The retail run on this thread was of the earlier form with the BC1 wiring, and it is cited in the stacked PR. - No GPU involvement; the GPU tests in the workspace run are `main`'s. - The block rebuild of any format (the stacked PR does BC1). - A stream that spans several requests, or several streams in one request, if titles do that. **AI use** - Claude Code (Claude Fable 5.2), the decoder, tests and first description; Codex (GPT-6.2 Astra), the independent fixtures' encoder and a review; Claude Code (Claude Opus 5.5), the split and this description
The rANS lanes a BCPack stream is split into, for BC1, BC3, BC4, BC5,
BC6H and BC7: a port of the decoder module of Microsoft's silicon-rans
sample (MIT), with the byte feeder and symbol release after the format
notes of bcpack-decoder and bcpack-rs (MIT, no code taken). The 128
static models are generated by scripts/gen_bcpack_tables.py from the
sample. Nothing calls it yet; DirectStorage still refuses BCPack
requests. Tested against fixtures from an encoder written independently
from the notes (tests/data/bcpack/generate.py) and a round-trip encoder.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:15:14 +00:00
github-bot closed this pull request 2026-11-26 04:15:14 +00:00
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-23 21:04 UTC · original

Rebased on main eaa36b6 together with #201 (2cad220, no conflicts). cargo test --release -p xcl --lib bcpack: 11 passed; dstorage: 12 passed.

Overlaps: stacked on #201 (its first commit is #201's). #167 also edits hle/dstorage.rs; they merge without conflicts. Nothing in HANDOFF.md or main covers BCPack.

**@⁠Kalmarv** on GitHub · 2026-11-23 21:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7113952917) Rebased on main eaa36b6 together with #201 (2cad220, no conflicts). `cargo test --release -p xcl --lib bcpack`: 11 passed; `dstorage`: 12 passed. Overlaps: stacked on #201 (its first commit is #201's). #167 also edits `hle/dstorage.rs`; they merge without conflicts. Nothing in HANDOFF.md or main covers BCPack.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-23 21:06 UTC · original

Correction to this PR's motivation: #211 found the cause of the missing menu letters, and it isn't BCPack. The glyph caches are small render targets the title fills from the CPU, which title_textures::register never uploaded; with #211 the body text is complete.

What still stands: main refuses every DirectStorage request with a BCPack stage, and nothing shows how many. Whether a refused request loses anything visible in this title isn't known. The per-mode counts in report.json would show how much is refused in a run.

AI-assisted (Claude Code).

**@⁠Kalmarv** on GitHub · 2026-11-23 21:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7114007109) Correction to this PR's motivation: #211 found the cause of the missing menu letters, and it isn't BCPack. The glyph caches are small render targets the title fills from the CPU, which `title_textures::register` never uploaded; with #211 the body text is complete. What still stands: main refuses every DirectStorage request with a BCPack stage, and nothing shows how many. Whether a refused request loses anything visible in this title isn't known. The per-mode counts in `report.json` would show how much is refused in a run. AI-assisted (Claude Code).
Author
Owner

@⁠Cattn on GitHub · 2026-11-23 21:47 UTC · original

Tested on a retail title: #208 at a7ffb2f merged onto main 60565c4 plus #215, RTX 4070, Ryzen 7 7800X3D, Windows 11, release build. The same scripted run up to the intro, 170 s each, with report.json's dstorage.bcpack_refused compared:

Mode without #208 with #208
BC1 1,492 requests (76.0 MB) 0
BC5 108 (7.1 MB) 108
BC6H 1 (1.0 MB) 1
BC7 155 (19.0 MB) 118
  • The log shows BCPack BC1: first request unpacked (39541 to 65536 bytes). Only one BC1 stream is reported as not unpacked (BCPack BC1 streams not unpacked so far: 1).
  • No crash or device removal in the 170 s; the run was ended by XCL_RUN_SECONDS.
  • cargo test --release -p xcl --lib bcpack: 11 passed.
  • "Without #208" is the same branch just before merging it (main at the time, plus #215).

No visible difference in the intro yet. Its picture area is still one flat dark colour, and it's drawn as a slanted full-screen quad, so something else is in the way there. BC7 remains the largest refused mode after this.

**@⁠Cattn** on GitHub · 2026-11-23 21:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7114912611) Tested on a retail title: #208 at `a7ffb2f` merged onto main `60565c4` plus #215, RTX 4070, Ryzen 7 7800X3D, Windows 11, release build. The same scripted run up to the intro, 170 s each, with `report.json`'s `dstorage.bcpack_refused` compared: | Mode | without #208 | with #208 | |---|---|---| | BC1 | 1,492 requests (76.0 MB) | **0** | | BC5 | 108 (7.1 MB) | 108 | | BC6H | 1 (1.0 MB) | 1 | | BC7 | 155 (19.0 MB) | 118 | - The log shows `BCPack BC1: first request unpacked (39541 to 65536 bytes)`. Only one BC1 stream is reported as not unpacked (`BCPack BC1 streams not unpacked so far: 1`). - No crash or device removal in the 170 s; the run was ended by `XCL_RUN_SECONDS`. - `cargo test --release -p xcl --lib bcpack`: 11 passed. - "Without #208" is the same branch just before merging it (main at the time, plus #215). No visible difference in the intro yet. Its picture area is still one flat dark colour, and it's drawn as a slanted full-screen quad, so something else is in the way there. BC7 remains the largest refused mode after this.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-23 22:31 UTC · original

Regression run wanted. We have no title on our machine. If you can run scripts/smoke.ps1 -Game <your title folder> twice, once built from main (9ab7d76) and once from this PR's head (34c0ee5), please paste both xcl-smoke blocks here. I'll copy them into the description with your name and hardware.

🤖 Claude Opus 5.5

**@⁠Kalmarv** on GitHub · 2026-11-23 22:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7115851903) **Regression run wanted.** We have no title on our machine. If you can run `scripts/smoke.ps1 -Game <your title folder>` twice, once built from `main` (`9ab7d76`) and once from this PR's head (`34c0ee5`), please paste both `xcl-smoke` blocks here. I'll copy them into the description with your name and hardware. 🤖 Claude Opus 5.5
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-23 22:41 UTC · original

@⁠grahamster2 thank you, this is the run #208 needed. One thing: the PR check reads the xcl-smoke v1 blocks themselves (their commit, title, seconds, frames shown and peak commit lines), not a table. Could you add the two blocks exactly as scripts/smoke.ps1 printed them to your comment (an edit is fine)? I'll copy them into the description under Regression run with your name and hardware, and your 180 s runs under Tested.

🤖 Claude Opus 5.5

**@⁠Kalmarv** on GitHub · 2026-11-23 22:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7116062167) @⁠grahamster2 thank you, this is the run #208 needed. One thing: the PR check reads the `xcl-smoke v1` blocks themselves (their `commit`, `title`, `seconds`, `frames shown` and `peak commit` lines), not a table. Could you add the two blocks exactly as `scripts/smoke.ps1` printed them to your comment (an edit is fine)? I'll copy them into the description under **Regression run** with your name and hardware, and your 180 s runs under **Tested**. 🤖 Claude Opus 5.5
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-23 22:36 UTC · original · edited 2026-11-24 00:18 UTC

Test on a retail title (the retail title Series 1.0.2.1), main 9ab7d76 against this PR's head 34c0ee5, release builds, warm caches (coherent window already learned).

Setup: RTX 3080 10 GB, driver 610.88, 32 GB RAM, Windows 11 Pro 26200, DXC 1.8.2502 from SDK 10.0.26100, XCL_NETWORK=0.

Smoke, 60 s, no input (scripts/smoke.ps1):

9ab7d76 34c0ee5
exit 0x0 0x0
frames shown 1496 1473
presents per 2 s (last 3) 60 60 60 60 60 60
device removals / crashes 0 / 0 0 / 0
peak commit 14808 MB 14798 MB

180 s, XCL_ACTIVITY=1 XCL_PRESS_A_AT=30,40,50,60,70,80,95,110: two runs on 9ab7d76 and one on 34c0ee5. The menu path depends on when the presses land, so the runs went different ways. One main run and the PR run went into world loading; the other main run stayed in the menus.

9ab7d76 (menus) 9ab7d76 (loading) 34c0ee5 (loading)
presents 4896 1688 1752
bcpack_refused requests: BC1 / BC5 / BC6H / BC7 37 / 104 / 0 / 20 379 / 107 / 1 / 117 834 / 107 / 1 / 71
local video memory at the end 6.6 GB 20.3 GB 20.3 GB
end timer, exit 0 AV write at +0x13936, 128 s 0x80000003 at +0x193e00f (rax 0x8007000e), 159 s
  • As the description says, nothing calls the decoder yet: requests with a BCPack stage are still refused and counted, with the same modes as on main. No new warnings or errors came from the PR.
  • Both loading runs end the same way, on main too. Local video memory grows to 20 GB on the 10 GB card, then CreatePlacedResourceX fails with 0x8007000e, and the title stops. That is #248's growth on NVIDIA, not this PR.
  • cargo test --release -p xcl --lib bcpack on 34c0ee5: 7 passed, 0 failed.

Claude Code (Claude Opus 5.5) ran the tests and wrote this report. No game files attached.

**@⁠grahamster2** on GitHub · 2026-11-23 22:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7115972343) · edited 2026-11-24 00:18 UTC Test on a retail title (the retail title Series 1.0.2.1), `main` `9ab7d76` against this PR's head `34c0ee5`, release builds, warm caches (coherent window already learned). **Setup:** RTX 3080 10 GB, driver 610.88, 32 GB RAM, Windows 11 Pro 26200, DXC 1.8.2502 from SDK 10.0.26100, `XCL_NETWORK=0`. **Smoke, 60 s, no input** (`scripts/smoke.ps1`): | | `9ab7d76` | `34c0ee5` | |---|---|---| | exit | 0x0 | 0x0 | | frames shown | 1496 | 1473 | | presents per 2 s (last 3) | 60 60 60 | 60 60 60 | | device removals / crashes | 0 / 0 | 0 / 0 | | peak commit | 14808 MB | 14798 MB | **180 s, `XCL_ACTIVITY=1 XCL_PRESS_A_AT=30,40,50,60,70,80,95,110`:** two runs on `9ab7d76` and one on `34c0ee5`. The menu path depends on when the presses land, so the runs went different ways. One `main` run and the PR run went into world loading; the other `main` run stayed in the menus. | | `9ab7d76` (menus) | `9ab7d76` (loading) | `34c0ee5` (loading) | |---|---|---|---| | presents | 4896 | 1688 | 1752 | | `bcpack_refused` requests: BC1 / BC5 / BC6H / BC7 | 37 / 104 / 0 / 20 | 379 / 107 / 1 / 117 | 834 / 107 / 1 / 71 | | local video memory at the end | 6.6 GB | 20.3 GB | 20.3 GB | | end | timer, exit 0 | AV write at `+0x13936`, 128 s | `0x80000003` at `+0x193e00f` (rax `0x8007000e`), 159 s | - As the description says, nothing calls the decoder yet: requests with a BCPack stage are still refused and counted, with the same modes as on `main`. No new warnings or errors came from the PR. - Both loading runs end the same way, on `main` too. Local video memory grows to 20 GB on the 10 GB card, then `CreatePlacedResourceX` fails with `0x8007000e`, and the title stops. That is #248's growth on NVIDIA, not this PR. - `cargo test --release -p xcl --lib bcpack` on `34c0ee5`: 7 passed, 0 failed. Claude Code (Claude Opus 5.5) ran the tests and wrote this report. No game files attached.
Author
Owner

@⁠mastrr9 on GitHub · 2026-11-24 04:45 UTC · original

Provenance check + NVIDIA RTX 5080 Windows test run on 42c90e0b0499db3ad373925fa164ee1f1907c791:

Review

  • THIRD_PARTY.md provenance (microsoft/silicon-rans MIT, bcpack-decoder / bcpack-rs MIT) is GPL-2.0-only compatible and includes the table generator script (scripts/gen_bcpack_tables.py).

Tested

  • Hardware / OS / toolchain: NVIDIA GeForce RTX 5080 (driver 617.42), AMD Ryzen 7 9800X3D, Windows 11 25H2 (build 26200.9711), rustc 1.100.0 (MSVC), debug build.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4: 688 passed, 0 failed, 41 ignored.
  • New tests fixtures_decode_to_their_lanes, model_matches_the_patent_excerpt, random_streams_round_trip_in_every_model, damaged_streams_end_cleanly: all 4 passed.
  • SKIPPED GPU tests (2, wave32-only adapter): gpu_geometry_wave32_prefix_count_over_a_mask: no wave64, gpu_wave32_program_in_wave64_hardware: no wave64.

Not tested

  • Retail title / scripts/smoke.ps1 run (test suite only); AMD / Intel GPUs.

AI use: provenance check and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above.

**@⁠mastrr9** on GitHub · 2026-11-24 04:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7122310540) Provenance check + NVIDIA RTX 5080 Windows test run on `42c90e0b0499db3ad373925fa164ee1f1907c791`: ### Review - `THIRD_PARTY.md` provenance (`microsoft/silicon-rans` MIT, `bcpack-decoder` / `bcpack-rs` MIT) is GPL-2.0-only compatible and includes the table generator script (`scripts/gen_bcpack_tables.py`). ### Tested - Hardware / OS / toolchain: NVIDIA GeForce RTX 5080 (driver 617.42), AMD Ryzen 7 9800X3D, Windows 11 25H2 (build 26200.9711), `rustc 1.100.0` (MSVC), debug build. - `cargo build --workspace && cargo test --workspace -- --test-threads=4`: **688 passed, 0 failed, 41 ignored**. - New tests `fixtures_decode_to_their_lanes`, `model_matches_the_patent_excerpt`, `random_streams_round_trip_in_every_model`, `damaged_streams_end_cleanly`: **all 4 passed**. - `SKIPPED` GPU tests (2, wave32-only adapter): `gpu_geometry_wave32_prefix_count_over_a_mask: no wave64`, `gpu_wave32_program_in_wave64_hardware: no wave64`. ### Not tested - Retail title / `scripts/smoke.ps1` run (test suite only); AMD / Intel GPUs. *AI use: provenance check and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above.*
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 05:15 UTC · original

Test run of 42c90e0b0499db3ad373925fa164ee1f1907c791 on AMD RDNA4. I merged it onto current main 6025201 locally (clean merge).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 708 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 667 passed, 0 failed, 21 ignored
  • 0 SKIPPED; the bcpack entropy-stage tests pass.

Review: Adds an AMD RDNA4 run to the retail and NVIDIA runs above. Not called yet, so no runtime path changes.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 05:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7122784209) Test run of `42c90e0b0499db3ad373925fa164ee1f1907c791` on AMD RDNA4. I merged it onto current `main` `6025201` locally (clean merge). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **708 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 667 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; the `bcpack` entropy-stage tests pass. **Review:** Adds an AMD RDNA4 run to the retail and NVIDIA runs above. Not called yet, so no runtime path changes. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
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. Thank you – your synthetic fixtures and their generator (tests/data/bcpack) and the patent check went in with it as tests of the merged decoder (10915eb), credited in the commit. They gave the independent check #905 lacked without game data.

**@⁠ivall** on GitHub · 2026-11-24 10:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/208#issuecomment-7129071576) #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. Thank you – your synthetic fixtures and their generator (`tests/data/bcpack`) and the patent check went in with it as tests of the merged decoder (10915eb), credited in the commit. They gave the independent check #905 lacked without game data.

Pull request closed

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