shader: add exact MinLod readback fixture #1052

Merged
romn4rch merged 1 commit from upstream-pr/1059 into main 2026-11-24 00:14:57 +00:00
romn4rch commented 2026-11-23 23:55:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by romn4rch on 2026-11-23T23:55:10Z.


Change

Adds a smallest source-built plain-Sample MinLod reproducer for issue #809. The fixture fixes clamp 1 at mip 1 and adds a direct desktop HLSL control plus a stale mip-2 negative readback check, with exact 64-pixel/256-channel readback semantics.

Refs #809

Verification

Commit/build: 4ad7b0a and fad4eb0 worktree state, with DXC 1.9.2602.17.

  • ctest --preset dev --no-tests=error -R '^spirv_minlod_exact_warp$' -V --output-junit "$PWD/out/minlod-exact-warp.xml": passed on Microsoft Basic Render Driver / WARP 10.0.26100.10068 on Windows 11 build 26300, debug layer enabled. Translated SPIR-V and direct HLSL both read mip 1 across 64 pixels/256 channels with zero absolute error. The mip-2 negative control failed at pixel (0, 0), channel 1 as expected.
  • python -B tests/docs_links_check.py: passed, 15 Markdown files and 237 links checked.
  • cmake --build --preset dev --target offscreen_check: passed.

Physical GPU tests were not run. This PR makes only a WARP claim; hardware claim evidence remains a separate follow-up requirement.

Evidence and follow-up

The fixture uses the existing source-built 8x8 RGBA8 four-mip texture: red, green, blue, and yellow for mips 0 through 3. It fixes (0.25, 0.25) sampling, point mip filtering, ps_6_0, and the texel offset for the translated and control shaders. It does not claim fractional clamping, archive shader behavior, or full-game startup.

The dedicated reproduction command is documented in docs/experiments.md:

ctest --preset dev --no-tests=error -R '^spirv_minlod_exact_warp$' -V

Future physical-adapter work must report the commit, DXC version and flags, adapter, driver, Windows build, runtime, debug-layer status, and first mismatch or tested range separately.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

This change was AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6571354886 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1059). Originally posted by [romn4rch](https://github.com/romn4rch) on 2026-11-23T23:55:10Z. --- ## Change Adds a smallest source-built plain-Sample `MinLod` reproducer for issue #809. The fixture fixes clamp 1 at mip 1 and adds a direct desktop HLSL control plus a stale mip-2 negative readback check, with exact 64-pixel/256-channel readback semantics. Refs #809 ## Verification Commit/build: `4ad7b0a` and `fad4eb0` worktree state, with DXC 1.9.2602.17. - `ctest --preset dev --no-tests=error -R '^spirv_minlod_exact_warp$' -V --output-junit "$PWD/out/minlod-exact-warp.xml"`: passed on Microsoft Basic Render Driver / WARP 10.0.26100.10068 on Windows 11 build 26300, debug layer enabled. Translated SPIR-V and direct HLSL both read mip 1 across 64 pixels/256 channels with zero absolute error. The mip-2 negative control failed at pixel `(0, 0)`, channel 1 as expected. - `python -B tests/docs_links_check.py`: passed, 15 Markdown files and 237 links checked. - `cmake --build --preset dev --target offscreen_check`: passed. Physical GPU tests were not run. This PR makes only a WARP claim; hardware claim evidence remains a separate follow-up requirement. ## Evidence and follow-up The fixture uses the existing source-built 8x8 RGBA8 four-mip texture: red, green, blue, and yellow for mips 0 through 3. It fixes `(0.25, 0.25)` sampling, point mip filtering, `ps_6_0`, and the texel offset for the translated and control shaders. It does not claim fractional clamping, archive shader behavior, or full-game startup. The dedicated reproduction command is documented in `docs/experiments.md`: ```powershell ctest --preset dev --no-tests=error -R '^spirv_minlod_exact_warp$' -V ``` Future physical-adapter work must report the commit, DXC version and flags, adapter, driver, Windows build, runtime, debug-layer status, and first mismatch or tested range separately. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. This change was AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:46:04 +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!1052
No description provided.