Formats: test BC1 endpoint prediction and quadrant packing #2036

Manually merged
github merged 1 commit from gh-pr/2036/head into gh-pr/2036/base 2026-11-26 04:52:24 +00:00
Owner

@⁠Dathinel on GitHub · 2026-11-25 03:50 UTC · original
Dathinel:tests/bc1-synthetic-reference → main · +19 −0 · 1 files · 1 commits · merged 2026-11-25 21:53 UTC

Add a two-block BC1 case to the default test suite. It checks RGB565 wraparound, endpoint prediction from the preceding block and the wire order of four distinct 2×2 index groups. The existing lane round-trip stops before block packing.

Run cargo test -p victory-formats bc1_endpoint_prediction_and_quadrant_order. Swapping the upper quadrants makes the assertion fail. The expected blocks were cross-checked with bcpack-rs's Python assembler using fresh indices and the synthetic fixture's ranks translated to BC1 wire codes. The test uses the crate's own fixture and adds no dependencies.

Windows checks: 39 format tests passed (5 ignored), and both workspace Clippy configurations passed. The full workspace run had five GPU/shader failures on this machine; all five also failed on unmodified main at 940d32f6.

NEW-60 coordination claim. AI-assisted with Codex and reviewed by Claude Code.

**@⁠Dathinel** on GitHub · 2026-11-25 03:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/2036) `Dathinel:tests/bc1-synthetic-reference` → `main` · +19 −0 · 1 files · 1 commits · merged 2026-11-25 21:53 UTC Add a two-block BC1 case to the default test suite. It checks RGB565 wraparound, endpoint prediction from the preceding block and the wire order of four distinct 2×2 index groups. The existing lane round-trip stops before block packing. Run `cargo test -p victory-formats bc1_endpoint_prediction_and_quadrant_order`. Swapping the upper quadrants makes the assertion fail. The expected blocks were cross-checked with [bcpack-rs's Python assembler](https://github.com/Ahmet-Dedeler/bcpack-rs/blob/b1c3099a3402de8b76c9263a828791bd8bc0c930/python/bcpack.py) using fresh indices and the synthetic fixture's ranks translated to BC1 wire codes. The test uses the crate's own fixture and adds no dependencies. Windows checks: 39 format tests passed (5 ignored), and both workspace Clippy configurations passed. The full workspace run had five GPU/shader failures on this machine; all five also failed on unmodified main at 940d32f6. [NEW-60 coordination claim](https://git.gtahub.st/github/Marvisak--VIctory/issues/1633). AI-assisted with Codex and reviewed by Claude Code.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:52:20 +00:00
github manually merged commit 3f69be262f into gh-pr/2036/base 2026-11-26 04:52:24 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-25 03:55 UTC · original

Triage verdict — Ready as a standalone regression (3f69be2)

Evidence

  • @⁠Dathinel's fixture adds a default byte-level assertion over two BC1 blocks: endpoint prediction from the preceding block, RGB565 wraparound, and the wire order of distinct index quadrants. This protects the packing behavior beyond the existing lane round-trip. BC1 regression

Checks and limits

  • The Windows check passed on this head. I also applied the exact test commit on top of the proposed history-ring change in #2034. The combined formats suite passed 39 tests with five ignored, including this fixture. Windows CI
  • This fixture checks one populated history slot. Separate maximum-distance and wraparound coverage belongs with the history implementation.

Next step

  • This can land independently of #2034. Keep the asserted on-wire bytes when integrating either decoder performance proposal so they share the same packing regression.

This verification was AI-assisted.

**@⁠jeremygold02** on GitHub · 2026-11-25 03:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/2036#issuecomment-7152367634) **Triage verdict — Ready as a standalone regression** (`3f69be2`) **Evidence** - @⁠Dathinel's fixture adds a default byte-level assertion over two BC1 blocks: endpoint prediction from the preceding block, RGB565 wraparound, and the wire order of distinct index quadrants. This protects the packing behavior beyond the existing lane round-trip. [BC1 regression](https://github.com/Marvisak/VIctory/blob/3f69be262fb175ac1f2a0207d35037d518cf8d92/crates/victory-formats/src/bcpack.rs#L1267-L1285) **Checks and limits** - The Windows check passed on this head. I also applied the exact test commit on top of the proposed history-ring change in #2034. The combined formats suite passed 39 tests with five ignored, including this fixture. [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/45542673823/job/138964701929) - This fixture checks one populated history slot. Separate maximum-distance and wraparound coverage belongs with the history implementation. **Next step** - This can land independently of #2034. Keep the asserted on-wire bytes when integrating either decoder performance proposal so they share the same packing regression. This verification was AI-assisted.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 09:19 UTC · original

Automated triage for the maintainers.
Merge candidate.

  • This PR only adds a test: bc1_endpoint_prediction_and_quadrant_order in the crates/victory-formats/src/bcpack.rs tests. It decodes two BC1 blocks through the crate's synthetic tables() fixture and asserts the exact bytes on the wire. That covers endpoint prediction from the previous block, RGB565 wraparound and the order of the 2x2 index quadrants. No existing test reaches block packing through decode (every_layout_round_trips_through_the_lanes stops at the lanes).
  • The expected bytes were cross-checked against an independent public implementation, and the author reports that swapping the quadrants makes the test fail. It adds no data from the title or SDK and no dependencies. No other open PR adds this test; the BC1 test in #315 sits inside a large bundle and only checks bc1_color on its own.

CI: passing (check).

Recommending a look, not approving.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 09:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/2036#issuecomment-7158169338) <!-- victory-triage v1 head=3f69be262fb175ac1f2a0207d35037d518cf8d92 verdict=merge-candidate at=2026-11-25T09:19:00Z --> Automated triage for the maintainers. **Merge candidate.** - This PR only adds a test: `bc1_endpoint_prediction_and_quadrant_order` in the `crates/victory-formats/src/bcpack.rs` tests. It decodes two BC1 blocks through the crate's synthetic `tables()` fixture and asserts the exact bytes on the wire. That covers endpoint prediction from the previous block, RGB565 wraparound and the order of the 2x2 index quadrants. No existing test reaches block packing through `decode` (`every_layout_round_trips_through_the_lanes` stops at the lanes). - The expected bytes were cross-checked against an independent public implementation, and the author reports that swapping the quadrants makes the test fail. It adds no data from the title or SDK and no dependencies. No other open PR adds this test; the BC1 test in #315 sits inside a large bundle and only checks `bc1_color` on its own. CI: passing (`check`). Recommending a look, not approving. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2036
No description provided.