textures: test the swizzle layout handoff with aliased output #1025

Merged
Jess-Doit merged 1 commit from upstream-pr/1032 into main 2026-11-23 22:32:39 +00:00
Jess-Doit commented 2026-11-23 22:15:19 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-23T22:15:19Z.


Change

  • Extend the optional #979 AddrLib check with a source-built factory caller. Compare flag-zero selection with separate output and with output aliased to the descriptor's layout field.
  • Feed both results to the test texture computer and compare all eight mips and 21,845 generated texels. Verify that linear and tiled maps are distinct, zero width preserves the outputs, and S_OK without a layout write is detected.

Refs #870.

Verification

Tested c262d28 on Windows 10 22H2 19045.6456 with MSVC 19.44 x64. Debug and Release passed all four XG tests. The stale linear map disagreed on all 21,845 tiled texels.

python -I -B tools/fetch_addrlib.py
cmake --preset dev -DXBOX2WINDOWS_ADDRLIB_DIR=out/deps/mesa/src/amd/addrlib
cmake --build --preset dev --target xg_swizzle_select_check
ctest --preset dev --no-tests=error -R '^xg_swizzle_' -V

Repeat the last three commands with release.

The optional-dependency control reported four skips. The docs-link and bidirectional-control checks passed.

cmake -S . -B out/build/no-addrlib -G Ninja -DCMAKE_BUILD_TYPE=Release -DXBOX2WINDOWS_ADDRLIB_DIR=
cmake --build out/build/no-addrlib --target xg_swizzle_select_check
ctest --test-dir out/build/no-addrlib --no-tests=error -R '^xg_swizzle_' -V
python -I -B tests/docs_links_check.py
python -I -B tests/bidi_controls_check.py

Evidence and follow-up

The MIT-licensed fixture generates a 128 × 128 RGBA8 texture with eight mips and uses the pinned PC AddrLib profile from #979. The flag-zero result and returned encoding for the exact Xbox export still need an independent reference. Fixture results on #870

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for the verification checks.
  • I considered a negative control or failure case for a new fixture.
  • I updated the experiments documentation.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted (Codex).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6569935212 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1032). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-23T22:15:19Z. --- ## Change - Extend the optional #979 AddrLib check with a source-built factory caller. Compare flag-zero selection with separate output and with output aliased to the descriptor's layout field. - Feed both results to the test texture computer and compare all eight mips and 21,845 generated texels. Verify that linear and tiled maps are distinct, zero width preserves the outputs, and `S_OK` without a layout write is detected. Refs #870. ## Verification Tested `c262d28` on Windows 10 22H2 `19045.6456` with MSVC 19.44 x64. Debug and Release passed all four XG tests. The stale linear map disagreed on all 21,845 tiled texels. ```powershell python -I -B tools/fetch_addrlib.py cmake --preset dev -DXBOX2WINDOWS_ADDRLIB_DIR=out/deps/mesa/src/amd/addrlib cmake --build --preset dev --target xg_swizzle_select_check ctest --preset dev --no-tests=error -R '^xg_swizzle_' -V ``` Repeat the last three commands with `release`. The optional-dependency control reported four skips. The docs-link and bidirectional-control checks passed. ```powershell cmake -S . -B out/build/no-addrlib -G Ninja -DCMAKE_BUILD_TYPE=Release -DXBOX2WINDOWS_ADDRLIB_DIR= cmake --build out/build/no-addrlib --target xg_swizzle_select_check ctest --test-dir out/build/no-addrlib --no-tests=error -R '^xg_swizzle_' -V python -I -B tests/docs_links_check.py python -I -B tests/bidi_controls_check.py ``` ## Evidence and follow-up The MIT-licensed fixture generates a 128 × 128 RGBA8 texture with eight mips and uses the pinned PC AddrLib profile from #979. The flag-zero result and returned encoding for the exact Xbox export still need an independent reference. [Fixture results on #870](https://github.com/R0Y00/Xbox2Windows/issues/870#issuecomment-7115476920) ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for the verification checks. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated the experiments documentation. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted (Codex).
upstream-sync closed this pull request 2026-11-24 06:45:56 +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!1025
No description provided.