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

Merged
BZ110 merged 1 commit from upstream-pr/399 into main 2026-11-22 00:26:10 +00:00
BZ110 commented 2026-11-22 00:20:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by BZ110 on 2026-11-22T00:20:27Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6536264816 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/399). Originally posted by [BZ110](https://github.com/BZ110) on 2026-11-22T00:20:27Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:42:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
R0Y00/Xbox2Windows!393
No description provided.