Repository navigation
Conversation
999e72d to
2cad220
Compare
|
Rebased on main eaa36b6 together with #201 (2cad220, no conflicts). Overlaps: stacked on #201 (its first commit is #201's). #167 also edits |
|
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 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 AI-assisted (Claude Code). |
2cad220 to
a7ffb2f
Compare
…ocks rebuilt Their work, merged as it is. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Tested on a retail title: #208 at
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. |
a7ffb2f to
34c0ee5
Compare
|
Regression run wanted. We have no title on our machine. If you can run 🤖 Claude Opus 5.5 |
|
Test on a retail title (the retail title Series 1.0.2.1), Setup: RTX 3080 10 GB, driver 610.88, 32 GB RAM, Windows 11 Pro 26200, DXC 1.8.2502 from SDK 10.0.26100, Smoke, 60 s, no input (
180 s,
Claude Code (Claude Opus 5.5) ran the tests and wrote this report. No game files attached. |
|
@grahamster2 thank you, this is the run #208 needed. One thing: the PR check reads the 🤖 Claude Opus 5.5 |
Handle 16-byte constant-buffer records, upload intro textures from their CPU view, and decode BC1 BCPack streams. Share bounded texture pages, batch upload staging, and tolerate pages decommitted during streaming reads. Includes work from ivall/xcl xcl-dev#208, xcl-dev#244, xcl-dev#252, xcl-dev#254, xcl-dev#269 and xcl-dev#283. DirectStorage late destination pages are already in the base. Assisted-by: OpenAI Codex (gpt-6.2-sol)
… BC1 requests are unpacked Their work, merged as it is. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
34c0ee5 to
42c90e0
Compare
|
Provenance check + NVIDIA RTX 5080 Windows test run on Review
Tested
Not tested
AI use: provenance check and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above. |
|
Test run of Tested
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 Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
Integrate upstream ivall/xcl PR #273 (including #208), by Kalmarv, head ce8839b938e06767379be0cc1f84f366a5609bb3. Preserve synthetic test fixtures and third-party provenance. Only BC1 reconstruction is supported; other modes remain unsupported. No Windows build or GPU tests performed here. Assisted-by: ChatGPT (GPT-6.2)
VIctory's code is GPL-3.0; its author allowed its use in XCL under GPL-2.0-only (2026-11-24): THIRD_PARTY.md and the decoder's header say so, with the project's URL. THIRD_PARTY.md also notes that the 128 rANS models of bcpack-tables.bin are, number for number, those of Microsoft's silicon-rans sample (MIT), compared against the tables generated from mdu_minirans.v in #208. Request::check is the enqueue check again (it had become a test-only wrapper of check_with_bc1). The README lists DirectStorage with BCPack and describes XCL_SAMPLE_BCPACK; scripts/test.ps1 lists it with the other sample variables. HANDOFF.md is left as it is (the PR's edit of it is not taken).
…ainst the patent Without XCL_SAMPLE_BCPACK nothing showed that a stream decodes. The 14 fixtures of #208 (tests/data/bcpack, made by generate.py, an encoder written from the format notes and not from either decoder; all six modes, up to 64 KiB of output) now go through the lane stage of the ported decoder, which gives every fixture's symbols; bc1-1-8, whose states are cut shorter than an encoder can cut them, is refused. With 7 input bytes per schedule round instead of 8 the test fails. The 8-bit model 11 is checked against the base table printed in US 11,234,023, and every model sums to 65536. Fixtures and generator by Kalmarv (#208).
|
#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 ( |
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 asmaindoes. 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, onmain9ce2070(rebased from34c0ee5on9ab7d76; 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 thedecodermodule of Microsoft's silicon-rans sample (mdu_minirans.vat 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.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.hle/bcpack/mod.rs:lane_widths(mode)anddecode_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.pyis 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=4on42c90e0: 688 passed, 0 failed, 41 ignored (thexcllibrary: 648 passed, 21 ignored). SKIPPED GPU tests:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware, both "no wave64".cargo test -p xcl --lib bcpackon42c90e0: 7 passed, 0 failed. These are the four tests below andmain's three BCPack refusal tests indstorage, which pass unchanged since nothing here is called.cargo build -p xclgives one warning, inhle/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:
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:
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.
mdu_minirans.v(2f6827d)docs/SPEC.md(d2cb8f3)docs/BCPACK_SPEC.md(c51ec52)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:
Add experimental BCPack BC1 decoding and clarify pipeline activity #233 (@Yeetbot159) adds opt-in BC1 decoding (
XCL_DSTORAGE_BCPACK_BC1=1) in the samehle/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:THIRD_PARTY.md;dstorage.rs.The stacked PR is the one that meets Add experimental BCPack BC1 decoding and clarify pipeline activity #233 in
dstorage.rs, and the differences there are listed in it.DirectStorage: a destination page array entry that is 0 at enqueue is read at the request's turn #289 (@theaustinayers), the physical-page destination write in
hle/dstorage.rs, is merged and is in9ce2070. This PR does not touch that file.DirectStorage: BCPack BC3, BC4 and BC5 block rebuilds, without their tables, not yet called #340 (@NiiRoZz, BC3 / BC4 / BC5 block rebuilds) is stacked on this PR's and DirectStorage: BCPack BC1 requests are unpacked, tables from bcpack-rs #273's earlier heads (
34c0ee5,5f12643), so it needs a rebase onto the new ones. DirectStorage: prototype documented BC7 mode-6 block reconstruction #438 (@Prime1997, a BC7 mode-6 prototype) adds its own file and merges with42c90e0without 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:
PR:
Not tested
main's.AI use