Repository navigation
Conversation
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 <noreply@openai.com>
|
Rerun on the new head
The first run, on 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
Not tested
AI use
|
There was a problem hiding this comment.
Review of 8cb6ba1 against its merge base 47efa2e (the tip of main when I read it), by reading the code; nothing of the PR was built or run here (one check below used a separate script over the tables on main). I found no defect in the decoder. What I checked, and three smaller points about the tests and the description:
- Batching keeps the schedule (
crates/xcl/src/hle/bcpack/victory.rs:293-333,:339-358). A batch ends in the round wheredone == fulladvancespos, and in that rounddonebecomes 0 andmovedmakesidle0, so restartingpos,doneandidleat 0 for the next batch is the state the single loop onmainhad at that point. The lanes (latch,out,stalled,need,x,left) and the source iterator live in theRecordStream, so read-ahead carries over. The record indexrow[j * PER + pos % PER]is the oldrecords[pos / per * stride + j * per + pos % per], at most 31 in a 32-byte row. - The symbol lookup rewrite gives the same values (
victory.rs:221-243). With ascending starts,slot < start[1]is the old bucket 0,1 + count(start[2..] <= slot)is the old bucket, and since the offset is below2^(b-1)the oldkequalsb, sostart[b] + offset * fis the old maskedc(it is at mostslot, so neither the mask nor the wrapping multiply did anything). I also compared the old and new(sym, f, c)in a separate script over the tables onmainfor all 128 models and all 65536 slots: no difference. - Error precedence (
victory.rs:127-132). After a block error the rest of the records are drained, so a stream that runs out anywhere still reports the lane error first, as onmain; a lane error ends the iterator (:350-353).dstcan now be partly written when the lane error comes late; the only caller (crates/xcl/src/hle/bcpack/mod.rs:63-66) drops it. - No new panic on untrusted input. A record is now always 32 bytes instead of
stride; every reader takes fixed indices or bounded ranges (s[8..12],s[6..14],s[20..24],s[4..12],s[8..24],s[o..o + 2]), none depends on the slice length, and the bytes paststrideare never written and stay 0.
-
CONFIRMED (tests, minor): the new byte-exact tests do not cross a batch boundary with varying data.
decoded_blocks_match_the_previous_decoder(victory.rs:1061-1096) decodes 128 bytes per format, 16 or 8 blocks, so it stays inside the first batch of 64.batch_boundaries_preserve_lane_read_ahead(victory.rs:1099-1104) usesbc7-8192-3, whose symbols are all zero (crates/xcl/src/hle/bcpack/tests.rs:18-30): all 4096 records are the same, and the same as a batch row that was never written. A record dropped, repeated or left unwritten at a boundary would pass it. What does cover the boundaries is the test that was already there,fixtures_decode_to_their_lanes(tests.rs:33-55), which now goes throughRecordStream(victory.rs:151-159) and comparesbc1-700-2,bc7-700-2andbc1-8192-3with their independent.lanesfiles, for both the one- and two-symbol paths. So the lane stage is covered; the block stage is not checked byte for byte past block 64 on anything but a constant output. Suggestion: addbc1-700-2(the plain formats have no block errors, so its random symbols decode) at 700 blocks against reference bytes or a hash frommain's decoder, and block counts of 63, 64 and 128. -
CONFIRMED (description): the byte-identity evidence is mostly outside the PR. "Every output byte matched, as did 3,610 truncated and junk cases" comes from a standalone benchmark that is not in the diff, so nobody else can rerun it; in the tree the claim rests on the tests of point 1. Also for the maintainer: Tested compares a workspace run on the head (741 passed, 3 failed, 41 ignored) with a library-only run on
main(695 passed, 21 ignored), so "the same three fail on main" is not the same command on both sides; the NVIDIA report in this thread has since run the whole suite at this head with 0 failed. TheCIworkflow showsaction_requiredat this head (not yet run), onlyPR checksis green. The regression blocks name47efa2eand the head and meet the frame and commit limits; the text mentions two head runs (922 and 1027 frames) and pastes the higher, both above 80 % of 954. -
CONFIRMED (scope, minor): two changes in one commit. The batching and the rewrite of the symbol lookup in
Lane::step(victory.rs:221-243) are independent; the second is a speed change to the rANS step that the title does not mention (the commit body does). It is correct as far as I can tell (see above), but it would have been easier to review on its own. The commit also drops the// shortcut:note above the oldlanesfunction (main,victory.rs:263-265) with the measured throughput and the plan for a faster split, which still applies.
Overlap: #1047 (open, adds crates/xcl/tests/dstorage_bcpack.rs) tests BCPack through the queue and does not touch this file; no other open PR changes victory.rs.
Verdict: no defects found; from the code this can be merged once CI has run on the head. Points 1 to 3 are improvements, not blockers.
Review by Claude Code (written by Claude Fable 5.2, checked and edited with Claude Opus 5.5); each point checked by a person before posting.
…t note back Review of xcl-dev#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 <noreply@anthropic.com>
|
Thank you for the careful review. I checked each point against the code. Pushed
Tested: AI-assisted: this follow-up was written and tested by Claude Code with Claude Sonnet 5.5. |
|
Follow-up at
Reply by Claude Code (Claude Opus 5.5); checked by a person before posting. |
…vall#1142, ivall#1150, ivall#1156, ivall#1182, ivall#1191, ivall#1195, ivall#1221 Integrate 10 high-impact open upstream PRs on top of upstream/main (930e8b4): - ivall#1182: share video memory across render targets aliased onto one physical page (~1.85-2.1 GB VRAM saved) - ivall#1142: declare tiled texture pools texture-only (D3D12_HEAP_FLAG_DENY_BUFFERS) for vkd3d-proton - ivall#1097: report process memory under Wine via PagefileUsage fallback - ivall#1078: bound BCPack record scratch memory to 2 KiB stack batches - ivall#1150: convert console clear-value formats in CreatePlacedResource - ivall#1156: release the interface returned by QueryInterface in class_for - ivall#1139: check pointer alignment in is_adopted before dereferencing - ivall#1195: skip ExecuteIndirect dispatch of untranslated console compute pipelines - ivall#1191: VirtualProtect commits lazy pages in its range first - ivall#1221: unmark lazy away mappings in FreeTitlePhysicalPages Assisted-by: Antigravity (Google DeepMind)
…ll#1221, and updated Linux PRs Update fork README for upstream/main 930e8b4 (BCPack BC1-BC7, XCL_PSO_WAIT_MS, low-VA ASLR < 2^40, alloc_pool, sparse tile parking/pool reuse, direct page moves, write-watch merge), newly integrated PRs (ivall#1078, ivall#1097, ivall#1139, ivall#1142, ivall#1150, ivall#1156, ivall#1182, ivall#1191, ivall#1195, ivall#1221), and updated Linux PRs (ivall#867, ivall#871, ivall#877). Assisted-by: Antigravity (Google DeepMind)
|
Linux (Wine + vkd3d-proton) + NVIDIA check: the tests of the current head 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 Tested
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. |
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.rskeeps 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.28760f3), same file:batch_boundaries_match_the_previous_decoderand the// shortcut:note, which still applies toRecordStream::fill_batch, back.Tested
cargo test --release --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputreported 741 passed, 3 failed, and 41 ignored. All three new tests passed. Two tests reported GPU skips because the D3D12 debug layer was unavailable.decoded_blocks_match_the_previous_decoder(128 bytes of each format) and the test below.28760f3):cargo test -p xcl --lib hle::bcpack: 10 passed, 0 failed.batch_boundaries_match_the_previous_decodercompares FNV-1a hashes ofbc1-700-2(63, 64, 65, 127, 128 and 129 blocks, and 700 blocks hashed per batch of 64) and ofbc1-8192-3with the output ofmain(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-databatch_boundaries_preserve_lane_read_aheadpasses 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 byfixtures_decode_to_their_lanes. Same machine as above.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
28760f3and on main47efa2e(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:
PR:
Earlier runs, on
8cb6ba1(before the review follow-up), main then PR: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.