DirectStorage: bound BCPack record scratch memory #1078

Open
github-bot wants to merge 2 commits from github-bot/gh-1078 into main AGit
Owner

@⁠TG0000 on GitHub · 2026-11-24 11:22 UTC · original
TG0000:perf/bcpack-stream-records → main · +252 −96 · 1 files · 2 commits · open

BCPack now reconstructs tiles from batches of at most 64 records. The decoder used to keep all intermediate records until the input was consumed. The bounded buffer is 2 KiB on the stack and the existing reconstruction history stays on the heap.

What is in it

  • crates/xcl/src/hle/bcpack/victory.rs keeps lane read-ahead across batches, handles zero symbols directly, and retains the error precedence for malformed streams. Regression tests check exact bytes for all six widths, batch boundaries, and invalid input.
  • Review follow-up (28760f3), same file: batch_boundaries_match_the_previous_decoder and the // shortcut: note, which still applies to RecordStream::fill_batch, back.

Tested

  • Ryzen 9 5900X, Radeon RX 6800 (driver 32.0.21045.29003), Windows 11 build 26300, Rust 1.100.0 MSVC.
  • The locked release workspace build succeeded. cargo test --release --locked --workspace --no-fail-fast -- --test-threads=4 --show-output reported 741 passed, 3 failed, and 41 ignored. All three new tests passed. Two tests reported GPU skips because the D3D12 debug layer was unavailable.
  • The run on main was the library tests only (695 passed, 3 failed, 21 ignored), not the workspace command used on the head, so the two counts are not the same command and do not compare directly; the workspace command was not run on main. The three failing tests are the same graphics tests in both runs: the 3D texture readback disagrees at subresource 2 and the other two meet a poisoned lock.
  • The standalone release benchmark compared 64 KiB and 512 KiB synthetic outputs across BC1, BC3, BC4, BC5, BC6H, and BC7. Peak decoder heap scratch fell by 5.41–77.80×. For example, BC1 at 512 KiB used 796,672 B on main and 10,240 B on head. Median elapsed times ranged from 3% slower to 16% faster. Every output byte matched, as did 3,610 truncated and junk cases; that benchmark is not part of the diff, so these cannot be rerun from the PR. In the tree the byte checks are decoded_blocks_match_the_previous_decoder (128 bytes of each format) and the test below.
  • Review follow-up (28760f3): cargo test -p xcl --lib hle::bcpack: 10 passed, 0 failed. batch_boundaries_match_the_previous_decoder compares FNV-1a hashes of bc1-700-2 (63, 64, 65, 127, 128 and 129 blocks, and 700 blocks hashed per batch of 64) and of bc1-8192-3 with the output of main (47efa2e) for the same fixtures. They are synthetic (tests/data/bcpack/generate.py), no game data. It fails when the first record of each full batch is skipped, when the last one is dropped and when the last one is repeated (three builds); the constant-data batch_boundaries_preserve_lane_read_ahead passes with the repeat. cargo clippy -p xcl --lib --tests: no warning on the changed lines. Not covered byte for byte past block 64: the formats with two symbols per block, because the only fixture over 64 blocks for them, bc7-700-2, has block errors; their lane stage is checked by fixtures_decode_to_their_lanes. Same machine as above.
  • On the previous head (8cb6ba1) the 45-second RX 6800 smoke comparison showed 954 frames on main and 922 and 1027 on head. The selected runs exited cleanly with zero crashes and device removals.

Regression run

On the head 28760f3 and on main 47efa2e (its merge base): one release build and one run each, from clean trees at those commits, the same title and 45 s. Other builds and tests ran on the PC during both runs, so the frame counts are not a timing comparison. Head: 1034 frames, main: 1027; peak commit 15131 MB against 15264 MB; no device removal and no crash.

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: AMD Radeon RX 6800
title: retail-title-1.0.2.1
seconds: 45
exit: 0x0
frames shown: 1027 (PresentX 1027)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15264 MB

PR:

xcl-smoke v1
commit: 28760f362331607e9103ee5f2f0e35ef24754c8e
gpu: AMD Radeon RX 6800
title: retail-title-1.0.2.1
seconds: 45
exit: 0x0
frames shown: 1034 (PresentX 1034)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15131 MB

Earlier runs, on 8cb6ba1 (before the review follow-up), main then PR:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: AMD Radeon RX 6800
title: retail-title-1.0.2.1
seconds: 45
exit: 0x0
frames shown: 954 (PresentX 954)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15118 MB
xcl-smoke v1
commit: 8cb6ba1a508a504a5fb23166db037f8d9ee32ed1
gpu: AMD Radeon RX 6800
title: retail-title-1.0.2.1
seconds: 45
exit: 0x0
frames shown: 1027 (PresentX 1028)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15124 MB

Not tested

Gameplay FPS, retail BCPack throughput, NVIDIA GPUs, and Wine.

AI use

Codex with GPT 6.2 Sol implemented the patch, added the tests, ran validation, and drafted this description. Claude Code with Claude Sonnet 5.5 wrote the review follow-up commit (the boundary test and the restored note) and updated this description for it.

**@⁠TG0000** on GitHub · 2026-11-24 11:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/1078) `TG0000:perf/bcpack-stream-records` → `main` · +252 −96 · 1 files · 2 commits · open BCPack now reconstructs tiles from batches of at most 64 records. The decoder used to keep all intermediate records until the input was consumed. The bounded buffer is 2 KiB on the stack and the existing reconstruction history stays on the heap. **What is in it** - `crates/xcl/src/hle/bcpack/victory.rs` keeps lane read-ahead across batches, handles zero symbols directly, and retains the error precedence for malformed streams. Regression tests check exact bytes for all six widths, batch boundaries, and invalid input. - Review follow-up (`28760f3`), same file: `batch_boundaries_match_the_previous_decoder` and the `// shortcut:` note, which still applies to `RecordStream::fill_batch`, back. **Tested** - Ryzen 9 5900X, Radeon RX 6800 (driver 32.0.21045.29003), Windows 11 build 26300, Rust 1.100.0 MSVC. - The locked release workspace build succeeded. `cargo test --release --locked --workspace --no-fail-fast -- --test-threads=4 --show-output` reported 741 passed, 3 failed, and 41 ignored. All three new tests passed. Two tests reported GPU skips because the D3D12 debug layer was unavailable. - The run on main was the library tests only (695 passed, 3 failed, 21 ignored), not the workspace command used on the head, so the two counts are not the same command and do not compare directly; the workspace command was not run on main. The three failing tests are the same graphics tests in both runs: the 3D texture readback disagrees at subresource 2 and the other two meet a poisoned lock. - The standalone release benchmark compared 64 KiB and 512 KiB synthetic outputs across BC1, BC3, BC4, BC5, BC6H, and BC7. Peak decoder heap scratch fell by 5.41–77.80×. For example, BC1 at 512 KiB used 796,672 B on main and 10,240 B on head. Median elapsed times ranged from 3% slower to 16% faster. Every output byte matched, as did 3,610 truncated and junk cases; that benchmark is not part of the diff, so these cannot be rerun from the PR. In the tree the byte checks are `decoded_blocks_match_the_previous_decoder` (128 bytes of each format) and the test below. - Review follow-up (`28760f3`): `cargo test -p xcl --lib hle::bcpack`: 10 passed, 0 failed. `batch_boundaries_match_the_previous_decoder` compares FNV-1a hashes of `bc1-700-2` (63, 64, 65, 127, 128 and 129 blocks, and 700 blocks hashed per batch of 64) and of `bc1-8192-3` with the output of `main` (`47efa2e`) for the same fixtures. They are synthetic (`tests/data/bcpack/generate.py`), no game data. It fails when the first record of each full batch is skipped, when the last one is dropped and when the last one is repeated (three builds); the constant-data `batch_boundaries_preserve_lane_read_ahead` passes with the repeat. `cargo clippy -p xcl --lib --tests`: no warning on the changed lines. Not covered byte for byte past block 64: the formats with two symbols per block, because the only fixture over 64 blocks for them, `bc7-700-2`, has block errors; their lane stage is checked by `fixtures_decode_to_their_lanes`. Same machine as above. - On the previous head (`8cb6ba1`) the 45-second RX 6800 smoke comparison showed 954 frames on main and 922 and 1027 on head. The selected runs exited cleanly with zero crashes and device removals. **Regression run** On the head `28760f3` and on main `47efa2e` (its merge base): one release build and one run each, from clean trees at those commits, the same title and 45 s. Other builds and tests ran on the PC during both runs, so the frame counts are not a timing comparison. Head: 1034 frames, main: 1027; peak commit 15131 MB against 15264 MB; no device removal and no crash. main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: AMD Radeon RX 6800 title: retail-title-1.0.2.1 seconds: 45 exit: 0x0 frames shown: 1027 (PresentX 1027) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15264 MB ``` PR: ``` xcl-smoke v1 commit: 28760f362331607e9103ee5f2f0e35ef24754c8e gpu: AMD Radeon RX 6800 title: retail-title-1.0.2.1 seconds: 45 exit: 0x0 frames shown: 1034 (PresentX 1034) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15131 MB ``` Earlier runs, on `8cb6ba1` (before the review follow-up), main then PR: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: AMD Radeon RX 6800 title: retail-title-1.0.2.1 seconds: 45 exit: 0x0 frames shown: 954 (PresentX 954) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15118 MB ``` ``` xcl-smoke v1 commit: 8cb6ba1a508a504a5fb23166db037f8d9ee32ed1 gpu: AMD Radeon RX 6800 title: retail-title-1.0.2.1 seconds: 45 exit: 0x0 frames shown: 1027 (PresentX 1028) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15124 MB ``` **Not tested** Gameplay FPS, retail BCPack throughput, NVIDIA GPUs, and Wine. **AI use** Codex with GPT 6.2 Sol implemented the patch, added the tests, ran validation, and drafted this description. Claude Code with Claude Sonnet 5.5 wrote the review follow-up commit (the boundary test and the restored note) and updated this description for it.
Reconstruct blocks from fixed batches instead of staging every decoded record. Preserve lane state across batches and report the first lane error before block errors. Handle the frequent zero symbol directly to keep decode throughput.

Co-Authored-By: GPT 6.2 Sol <[email protected]>
Review of #1078: the tests did not cross a batch of 64 records with varying
output. batch_boundaries_match_the_previous_decoder hashes the output of
bc1-700-2 at 63, 64, 65, 127, 128, 129 and 700 blocks (and per batch for
700), and of bc1-8192-3, against what the two-pass decoder of main
(47efa2e) gave for the same synthetic fixtures. A record dropped or
repeated at a batch end fails it.

The `// shortcut:` note on the one-lane-step-at-a-time schedule, dropped
with the old `lanes` function, still applies to RecordStream::fill_batch
and comes back.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:42:41 +00:00
Author
Owner

@⁠pvfreis on GitHub · 2026-11-24 14:06 UTC · original

Follow-up at 28760f3. I read the diff only; nothing was built or run here.

  • Point 1 is fixed. batch_boundaries_match_the_previous_decoder (victory.rs:1122-1156) checks bc1-700-2 at 63-65 and 127-129 blocks, each batch of 64 over 700 blocks, and bc1-8192-3, so a record dropped or repeated at a batch end now fails it. I did not recompute the hashes. The 64-block hash and the first per-batch hash of the 700-block decode are the same value, as they should be. The two-symbol formats past block 64 are still not covered byte for byte, and the description now says so.
  • Point 2 is fixed in the description: main's run is named as library-only, and the benchmark as outside the diff.
  • Point 3: the // shortcut: note is back above fill_batch (victory.rs:293-296). The symbol-lookup change stays in the first commit, as you chose.
  • Still open before merging: PR checks now fails at 28760f3 because the Regression run block names 8cb6ba1, and the check wants an xcl-smoke block made on 28760f3. CI shows action_required at this head, so it has not run yet.

Reply by Claude Code (Claude Opus 5.5); checked by a person before posting.

**@⁠pvfreis** on GitHub · 2026-11-24 14:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/1078#issuecomment-7133850668) Follow-up at `28760f3`. I read the diff only; nothing was built or run here. - Point 1 is fixed. `batch_boundaries_match_the_previous_decoder` (`victory.rs:1122-1156`) checks `bc1-700-2` at 63-65 and 127-129 blocks, each batch of 64 over 700 blocks, and `bc1-8192-3`, so a record dropped or repeated at a batch end now fails it. I did not recompute the hashes. The 64-block hash and the first per-batch hash of the 700-block decode are the same value, as they should be. The two-symbol formats past block 64 are still not covered byte for byte, and the description now says so. - Point 2 is fixed in the description: `main`'s run is named as library-only, and the benchmark as outside the diff. - Point 3: the `// shortcut:` note is back above `fill_batch` (`victory.rs:293-296`). The symbol-lookup change stays in the first commit, as you chose. - Still open before merging: `PR checks` now fails at `28760f3` because the **Regression run** block names `8cb6ba1`, and the check wants an `xcl-smoke` block made on `28760f3`. `CI` shows `action_required` at this head, so it has not run yet. Reply by Claude Code (Claude Opus 5.5); checked by a person before posting.
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-24 12:16 UTC · original · edited 2026-11-24 14:18 UTC

Rerun on the new head 28760f362331607e9103ee5f2f0e35ef24754c8e (same machine, debug; the follow-up adds batch_boundaries_match_the_previous_decoder only):

  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 745 passed, 0 failed, 41 ignored
  • Merged onto current main 930e8b4 (no conflict): 755 passed, 0 failed, 41 ignored
  • With fill_batch starting each batch at pos = 1 (the first record of every batch skipped), batch_boundaries_match_the_previous_decoder fails, and so do three older tests (fixtures_decode_to_their_lanes, decoded_blocks_match_the_previous_decoder, truncated_lane_stream_takes_precedence_over_invalid_block). I did not try the dropped and repeated last record.
  • hle::bcpack + hle::dstorage tests, 10 runs: 10 of 10 passed (24 each)

The first run, on 8cb6ba1, follows unchanged.


NVIDIA run, since Not tested lists NVIDIA. The change is CPU-side; this machine also has the D3D12 debug layer, so the two GPU tests your run skipped ran here.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (32-lane waves), driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools (D3D12 debug layer) installed; rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17
  • Exact head 8cb6ba1a508a504a5fb23166db037f8d9ee32ed1, which is on current main 47efa2e (so also the merged result):
    • debug, cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 744 passed, 0 failed, 41 ignored
    • release, cargo build --release --workspace, then cargo test --release --workspace --no-fail-fast -- --test-threads=4: 744 passed, 0 failed, 41 ignored
    • the three tests that fail in your RX 6800 runs (placed_title_textures_share_vram_and_preserve_pixels and the two on its lock) pass here, and test_title_draws_with_a_root_signature_under_the_debug_layer and uploads_start_from_each_subresources_state ran
  • The three new tests passed: streaming_tests::decoded_blocks_match_the_previous_decoder, batch_boundaries_preserve_lane_read_ahead, truncated_lane_stream_takes_precedence_over_invalid_block
  • hle::bcpack + hle::dstorage tests (the BCPack fixtures, junk / truncated streams, and the DirectStorage BCPack paths), 10 runs: 10 of 10 passed (23 tests each)
  • SKIPPED (no wave64 on this adapter): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
  • One unrelated note: a first release run, started without the release build of the test title (so both e2e tests failed on the missing xcl_testtitle.exe), also had list_x::tests::cross_queue_cycle_and_same_queue_fifo_do_not_deadlock fail once with E_OUTOFMEMORY while the machine was busy compiling. The clean rerun above passed it, and it doesn't touch BCPack.

Not tested

  • Real BCPack data from a title (none here) and the standalone heap/elapsed benchmark from the description, which isn't in the repository as far as I can see.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and tests on the machine above and wrote this report from the output.
**@⁠fromthemoonx** on GitHub · 2026-11-24 12:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/1078#issuecomment-7131211346) · edited 2026-11-24 14:18 UTC **Rerun on the new head `28760f362331607e9103ee5f2f0e35ef24754c8e`** (same machine, debug; the follow-up adds `batch_boundaries_match_the_previous_decoder` only): - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **745 passed, 0 failed, 41 ignored** - **Merged onto current `main` `930e8b4`** (no conflict): **755 passed, 0 failed, 41 ignored** - With `fill_batch` starting each batch at `pos = 1` (the first record of every batch skipped), `batch_boundaries_match_the_previous_decoder` fails, and so do three older tests (`fixtures_decode_to_their_lanes`, `decoded_blocks_match_the_previous_decoder`, `truncated_lane_stream_takes_precedence_over_invalid_block`). I did not try the dropped and repeated last record. - `hle::bcpack` + `hle::dstorage` tests, 10 runs: **10 of 10 passed** (24 each) The first run, on `8cb6ba1`, follows unchanged. --- NVIDIA run, since **Not tested** lists NVIDIA. The change is CPU-side; this machine also has the D3D12 debug layer, so the two GPU tests your run skipped ran here. **Tested** - NVIDIA GeForce RTX 3060 12 GB (32-lane waves), driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools (D3D12 debug layer) installed; rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17 - **Exact head `8cb6ba1a508a504a5fb23166db037f8d9ee32ed1`**, which is on current `main` `47efa2e` (so also the merged result): - debug, `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **744 passed, 0 failed, 41 ignored** - release, `cargo build --release --workspace`, then `cargo test --release --workspace --no-fail-fast -- --test-threads=4`: **744 passed, 0 failed, 41 ignored** - the three tests that fail in your RX 6800 runs (`placed_title_textures_share_vram_and_preserve_pixels` and the two on its lock) pass here, and `test_title_draws_with_a_root_signature_under_the_debug_layer` and `uploads_start_from_each_subresources_state` ran - The three new tests passed: `streaming_tests::decoded_blocks_match_the_previous_decoder`, `batch_boundaries_preserve_lane_read_ahead`, `truncated_lane_stream_takes_precedence_over_invalid_block` - `hle::bcpack` + `hle::dstorage` tests (the BCPack fixtures, junk / truncated streams, and the DirectStorage BCPack paths), 10 runs: **10 of 10 passed** (23 tests each) - SKIPPED (no wave64 on this adapter): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - One unrelated note: a first release run, started without the release build of the test title (so both e2e tests failed on the missing `xcl_testtitle.exe`), also had `list_x::tests::cross_queue_cycle_and_same_queue_fifo_do_not_deadlock` fail once with `E_OUTOFMEMORY` while the machine was busy compiling. The clean rerun above passed it, and it doesn't touch BCPack. **Not tested** - Real BCPack data from a title (none here) and the standalone heap/elapsed benchmark from the description, which isn't in the repository as far as I can see. **AI use** - Claude Code (Claude Opus 5.5) ran the builds and tests on the machine above and wrote this report from the output.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 15:17 UTC · original

Linux (Wine + vkd3d-proton) + NVIDIA check: the tests of the current head 28760f3 pass under Wine, and in one 100 s run of a retail title with 8cb6ba1, the head before it, every BCPack request still unpacked (2,442 requests, 0 failed), as on main in the run beside it (2,379, 0 failed).

Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to x86_64-pc-windows-gnu (rustc 1.98.0), XCL_NETWORK=0, XCL_PSO_PRELOAD=0. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s through XCL_PRESS_AT. Each head merged onto main 67a3735 + #684 (e56dbc3) without conflicts; 1 run of the base and 1 of 8cb6ba1. 28760f3 adds a test and a comment to 8cb6ba1 and no decoder code, so I did not repeat the run.

Tested

  • cargo test --release -p xcl --lib bcpack under Wine, with 28760f3 merged: 14 passed, 0 failed, batch_boundaries_match_the_previous_decoder among them (13 of 13 on 8cb6ba1).
bcpack_unpacked in report.json 67a3735 + #684 the same + 8cb6ba1
BC1 2,077 requests, 148,267,008 B, 0 failed 2,126 requests, 148,738,048 B, 0 failed
BC5 107, 7,077,888 B, 0 failed 112, 7,405,568 B, 0 failed
BC6H 1, 1,048,576 B, 0 failed 1, 1,048,576 B, 0 failed
BC7 194, 25,157,632 B, 0 failed 203, 26,898,432 B, 0 failed
refused 0 0

The request counts differ by a few percent between any two runs here, because a run is cut at 100 s while the world is still loading; I did not compare the unpacked bytes of the two builds.

Not tested: the decoder's memory use or speed, which is what this change is for; whether the textures look the same (no run of ours reaches a frame of the world); the rest of the test suite; AMD and Intel.

AI use: Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the tests and the two runs and wrote this note.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 15:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/1078#issuecomment-7135785137) Linux (Wine + vkd3d-proton) + NVIDIA check: the tests of the current head `28760f3` pass under Wine, and in one 100 s run of a retail title with `8cb6ba1`, the head before it, every BCPack request still unpacked (2,442 requests, 0 failed), as on `main` in the run beside it (2,379, 0 failed). **Setup:** Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to `x86_64-pc-windows-gnu` (rustc 1.98.0), `XCL_NETWORK=0`, `XCL_PSO_PRELOAD=0`. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s through `XCL_PRESS_AT`. Each head merged onto `main` `67a3735` + #684 (`e56dbc3`) without conflicts; 1 run of the base and 1 of `8cb6ba1`. `28760f3` adds a test and a comment to `8cb6ba1` and no decoder code, so I did not repeat the run. **Tested** - `cargo test --release -p xcl --lib bcpack` under Wine, with `28760f3` merged: 14 passed, 0 failed, `batch_boundaries_match_the_previous_decoder` among them (13 of 13 on `8cb6ba1`). | `bcpack_unpacked` in `report.json` | `67a3735` + #684 | the same + `8cb6ba1` | |---|---|---| | BC1 | 2,077 requests, 148,267,008 B, 0 failed | 2,126 requests, 148,738,048 B, 0 failed | | BC5 | 107, 7,077,888 B, 0 failed | 112, 7,405,568 B, 0 failed | | BC6H | 1, 1,048,576 B, 0 failed | 1, 1,048,576 B, 0 failed | | BC7 | 194, 25,157,632 B, 0 failed | 203, 26,898,432 B, 0 failed | | refused | 0 | 0 | The request counts differ by a few percent between any two runs here, because a run is cut at 100 s while the world is still loading; I did not compare the unpacked bytes of the two builds. **Not tested:** the decoder's memory use or speed, which is what this change is for; whether the textures look the same (no run of ours reaches a frame of the world); the rest of the test suite; AMD and Intel. **AI use:** Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the tests and the two runs and wrote this note.
Author
Owner

@⁠TG0000 on GitHub · 2026-11-24 13:58 UTC · original · edited 2026-11-24 16:45 UTC

Thank you for the careful review. I checked each point against the code.

Pushed 28760f3 on top of 8cb6ba1 (no force push):

  • Point 1: batch_boundaries_match_the_previous_decoder hashes the output of bc1-700-2 at 63, 64, 65, 127, 128 and 129 blocks (and at 700 blocks, per batch of 64) and of bc1-8192-3, against what main (47efa2e) decodes from the same fixtures. They are synthetic (made by generate.py), no game data. It fails when the first record of a full batch is skipped, when the last one is dropped, and when the last one is repeated; the constant-data test still passes with the repeat. Formats with two symbols per block are not covered byte for byte past block 64, because bc7-700-2 has block errors; the description says so.
  • Point 2: the description now says the run on main was the library tests only, not the same command as on the head, and that the byte-identity benchmark is not in the diff.
  • Point 3: the // shortcut: note is back on RecordStream::fill_batch, where it still applies. I left the symbol lookup change in this PR rather than rewrite history.

Tested: cargo test -p xcl --lib hle::bcpack: 10 passed, 0 failed. cargo clippy -p xcl --lib --tests: no warning on the changed lines. Update: xcl-smoke blocks for the new head 28760f3 and for main 47efa2e are now in the description (1034 and 1027 frames, no device removal or crash; other work ran on the PC, so not a timing comparison).

AI-assisted: this follow-up was written and tested by Claude Code with Claude Sonnet 5.5.

**@⁠TG0000** on GitHub · 2026-11-24 13:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/1078#issuecomment-7133639867) · edited 2026-11-24 16:45 UTC Thank you for the careful review. I checked each point against the code. Pushed `28760f3` on top of `8cb6ba1` (no force push): - Point 1: `batch_boundaries_match_the_previous_decoder` hashes the output of `bc1-700-2` at 63, 64, 65, 127, 128 and 129 blocks (and at 700 blocks, per batch of 64) and of `bc1-8192-3`, against what `main` (`47efa2e`) decodes from the same fixtures. They are synthetic (made by `generate.py`), no game data. It fails when the first record of a full batch is skipped, when the last one is dropped, and when the last one is repeated; the constant-data test still passes with the repeat. Formats with two symbols per block are not covered byte for byte past block 64, because `bc7-700-2` has block errors; the description says so. - Point 2: the description now says the run on `main` was the library tests only, not the same command as on the head, and that the byte-identity benchmark is not in the diff. - Point 3: the `// shortcut:` note is back on `RecordStream::fill_batch`, where it still applies. I left the symbol lookup change in this PR rather than rewrite history. Tested: `cargo test -p xcl --lib hle::bcpack`: 10 passed, 0 failed. `cargo clippy -p xcl --lib --tests`: no warning on the changed lines. Update: `xcl-smoke` blocks for the new head `28760f3` and for main `47efa2e` are now in the description (1034 and 1027 frames, no device removal or crash; other work ran on the PC, so not a timing comparison). AI-assisted: this follow-up was written and tested by Claude Code with Claude Sonnet 5.5.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 08:51 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 08:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1078#issuecomment-7157555972) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1078/head:github-bot/gh-1078'
git switch 'github-bot/gh-1078'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1078'
git switch 'github-bot/gh-1078'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1078'
git switch 'github-bot/gh-1078'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1078'
git switch 'main'
git merge --squash 'github-bot/gh-1078'
git switch 'main'
git merge --ff-only 'github-bot/gh-1078'
git switch 'main'
git merge 'github-bot/gh-1078'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.