textures: verify strict two-block BCPack decode through GPU readback #886

Manually merged
github merged 1 commit from gh-pr/886/head into gh-pr/886/base 2026-11-26 22:25:52 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-23 15:50 UTC · original
stan495:codex/bcpack-mode6-multiblock → main · +133 −0 · 3 files · 1 commits · merged 2026-11-23 16:03 UTC

Fixes #769.

  • Use the synthetic 132-byte two-block stream from the original fixture at 5e1af169. Build the expected mode-6 blocks and the 8x4 RGBA reference independently from their endpoints and selectors.
  • Feed the strict decoder's ordered 32-byte output to --check-bc7 and compare the complete capture through the translated copy shader. Register bc7_mode6_multiblock_warp and bc7_mode6_multiblock_hardware separately.
  • Require the first mismatch at (0, 0) after swapping blocks and at (7, 3) after changing the last selector. Truncations at 131, 66 and 32 bytes fail before upload. The first diagnostic at 131 bytes is lane 10 (width 6, q 0) at input byte 131: input ran out.

Verification

Tested 71ad6ef3a0658b9c73d68e6f47687c13feba9dbd on Windows 11 build 26200.9974. Both Microsoft Basic Render Driver (WARP 10.0.26100.9818) and Radeon RX 7900 XTX (32.0.32029.2010) matched all 32 pixels and 128 channels exactly. The D3D12 debug layer was enabled and reported zero errors or warnings on the positive draw.

With the pinned Leonida checkout under out/Leonida and the repository Python environment configured:

. .\tools\dev.ps1
$env:BCPACK_REFERENCE_TOOLS = (Resolve-Path 'out/Leonida/tools').Path
$env:XBOX2WINDOWS_ADAPTER = 'AMD Radeon RX 7900 XTX'
cmake --preset dev
cmake --build --preset dev --target offscreen_check --parallel 6
ctest --preset dev --no-tests=error -R '^(bc7_mode6_multiblock_(warp|hardware)|bc7_draw_(warp|hardware)|bc7_block_reference|bcpack_rans_symbols)$' -V
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py

All six selected CTest entries passed, including the original single-block case. The optional texture2ddecoder comparison inside bc7_block_reference was skipped. Both documentation checks passed. With BCPACK_REFERENCE_TOOLS unset, the two new tests report a skip.

**@⁠stan495** on GitHub · 2026-11-23 15:50 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/886) `stan495:codex/bcpack-mode6-multiblock` → `main` · +133 −0 · 3 files · 1 commits · merged 2026-11-23 16:03 UTC Fixes #769. - Use the synthetic 132-byte two-block stream from the original fixture at `5e1af169`. Build the expected mode-6 blocks and the 8x4 RGBA reference independently from their endpoints and selectors. - Feed the strict decoder's ordered 32-byte output to `--check-bc7` and compare the complete capture through the translated copy shader. Register `bc7_mode6_multiblock_warp` and `bc7_mode6_multiblock_hardware` separately. - Require the first mismatch at `(0, 0)` after swapping blocks and at `(7, 3)` after changing the last selector. Truncations at 131, 66 and 32 bytes fail before upload. The first diagnostic at 131 bytes is `lane 10 (width 6, q 0) at input byte 131: input ran out`. ## Verification Tested `71ad6ef3a0658b9c73d68e6f47687c13feba9dbd` on Windows 11 build 26200.9974. Both Microsoft Basic Render Driver (WARP 10.0.26100.9818) and Radeon RX 7900 XTX (32.0.32029.2010) matched all 32 pixels and 128 channels exactly. The D3D12 debug layer was enabled and reported zero errors or warnings on the positive draw. With the [pinned Leonida checkout](https://github.com/timelery/Leonida/tree/03d1e118a676d73aba66b1793cf033f6ad23b2b2/tools) under `out/Leonida` and the repository Python environment configured: ```powershell . .\tools\dev.ps1 $env:BCPACK_REFERENCE_TOOLS = (Resolve-Path 'out/Leonida/tools').Path $env:XBOX2WINDOWS_ADAPTER = 'AMD Radeon RX 7900 XTX' cmake --preset dev cmake --build --preset dev --target offscreen_check --parallel 6 ctest --preset dev --no-tests=error -R '^(bc7_mode6_multiblock_(warp|hardware)|bc7_draw_(warp|hardware)|bc7_block_reference|bcpack_rans_symbols)$' -V python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py ``` All six selected CTest entries passed, including the original single-block case. The optional `texture2ddecoder` comparison inside `bc7_block_reference` was skipped. Both documentation checks passed. With `BCPACK_REFERENCE_TOOLS` unset, the two new tests report a skip.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:25:50 +00:00
github manually merged commit 71ad6ef3a0 into gh-pr/886/base 2026-11-26 22:25:52 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.