textures: check BC7 raster placement at an odd block width #399

Manually merged
github merged 1 commit from gh-pr/399/head into gh-pr/399/base 2026-11-26 21:48:55 +00:00
Owner

@⁠BZ110 on GitHub · 2026-11-22 00:20 UTC · original
BZ110:textures/bc7-rectangular-raster → main · +7 −0 · 1 files · 1 commits · merged 2026-11-22 00:26 UTC

Change

Check the complete RGBA raster from fixture(columns=5, rows=7) against a digest computed by decoding the same 35 synthetic BC7 blocks as one 20×28 image with texture2ddecoder==1.0.6. The new check runs in the existing bc7_block_reference test and uses only the standard library. #348 proposes running the same script in Linux CI.

Verification

On Apple Silicon with Python 3.12.15 at 091a0b4:

python -E -S -B tests/bc7_blocks_check.py -v
python -E -S -B tests/bcpack_check.py
python -B tests/bc7_blocks_check.py -v

The first run passed seven checks and skipped the optional decoder comparison. All eight BCPack checks passed. With the independent decoder installed, the last run passed all eight BC7 checks, and the separate whole-image comparison matched all 560 RGBA texels after converting BGRA to RGBA.

For a negative control, I temporarily replaced index % columns with index & (columns - 1) in the raster placement calculation. The seven existing BC7 checks passed with this change. The new check alone failed, with a raster SHA-256 beginning 47425de0 instead of 3aac1b30.

AI-assisted. The commands were run and the results checked locally.

**@⁠BZ110** on GitHub · 2026-11-22 00:20 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/399) `BZ110:textures/bc7-rectangular-raster` → `main` · +7 −0 · 1 files · 1 commits · merged 2026-11-22 00:26 UTC ## Change Check the complete RGBA raster from `fixture(columns=5, rows=7)` against a digest computed by decoding the same 35 synthetic BC7 blocks as one 20×28 image with `texture2ddecoder==1.0.6`. The new check runs in the existing `bc7_block_reference` test and uses only the standard library. #348 proposes running the same script in Linux CI. ## Verification On Apple Silicon with Python 3.12.15 at `091a0b4`: ```sh python -E -S -B tests/bc7_blocks_check.py -v python -E -S -B tests/bcpack_check.py python -B tests/bc7_blocks_check.py -v ``` The first run passed seven checks and skipped the optional decoder comparison. All eight BCPack checks passed. With the independent decoder installed, the last run passed all eight BC7 checks, and the separate whole-image comparison matched all 560 RGBA texels after converting BGRA to RGBA. For a negative control, I temporarily replaced `index % columns` with `index & (columns - 1)` in the raster placement calculation. The seven existing BC7 checks passed with this change. The new check alone failed, with a raster SHA-256 beginning `47425de0` instead of `3aac1b30`. AI-assisted. The commands were run and the results checked locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:48:53 +00:00
github manually merged commit 091a0b4573 into gh-pr/399/base 2026-11-26 21:48:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.