tests: read back startup image_get_lod through static sampler and mip view limits #2334

Merged
RavenCurseBurg merged 2 commits from upstream-pr/2342 into main 2026-11-25 13:27:35 +00:00
RavenCurseBurg commented 2026-11-25 12:54:58 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T12:54:58Z.


Follows up on the static sampler and SRV window questions in #2311. The new WARP and hardware CTests run the synthetic gfx1013 pixel stage through the actual smpl manifest and root signature. They compare it with an independent HLSL shader on the same 4×4, three-mip texture.

  • Seven cases cover four SRV windows, point and linear mip filtering, a fractional MaxLOD, and a fractional MinLOD with a negative raw LOD. Both shaders must return the same four binary32 words. The numerical reference allows one LOD step (1/256).
  • On a view starting at mip 1, exposing two mips returns (1, 1) and exposing one returns (0, 1). A linear MaxLOD of 0.75 returns (0.75, 2). Replacing only smpl with smp must restore (2, 2).
  • The new --startup-image-2d-view operation uses the existing texture upload and translated static sampler path and reports one pixel as four hex words.

Verification

  • At 9e5361b1, all four selected Windows CTests passed with zero skips, including the new WARP test, the existing GET_LOD host controls, the 2D-array WARP test and the sample-LOD WARP test. WARP reported zero debug-layer warnings and errors. Pinned Windows build and test log
  • I then ran this PR's test and the same source-stamped renderer on Windows 11 24H2 build 26100.9711. WARP (10.0.26100.9711), RTX 4060 (32.0.15.9579) and UHD 770 (32.0.101.5973) each passed seven translated/direct pairs and the ordinary-sampler control. All 45 draws returned a pixel. The local debug layer was unavailable.
  • Six local host and documentation checks passed. I also tested 12 translated/direct pairs per adapter and the manifest control on RTX 4060, UHD 770 and WARP using the measurement fixture. Exact point-filter half-mip boundaries selected different neighbors on Intel and on WARP/NVIDIA. The regression checks the fractional lower clamp with linear filtering. Readbacks, versions and replay script

The measurement covers desktop D3D12. Native console sampler/view equivalence remains open.

Agent environment and model: Codex + GPT-6.2 Astra xhigh.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6604953562 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2342). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T12:54:58Z. --- Follows up on the static sampler and SRV window questions in #2311. The new WARP and hardware CTests run the synthetic gfx1013 pixel stage through the actual `smpl` manifest and root signature. They compare it with an independent HLSL shader on the same 4×4, three-mip texture. - Seven cases cover four SRV windows, point and linear mip filtering, a fractional MaxLOD, and a fractional MinLOD with a negative raw LOD. Both shaders must return the same four binary32 words. The numerical reference allows one LOD step (1/256). - On a view starting at mip 1, exposing two mips returns (1, 1) and exposing one returns (0, 1). A linear MaxLOD of 0.75 returns (0.75, 2). Replacing only `smpl` with `smp` must restore (2, 2). - The new `--startup-image-2d-view` operation uses the existing texture upload and translated static sampler path and reports one pixel as four hex words. **Verification** - At 9e5361b1, all four selected Windows CTests passed with zero skips, including the new WARP test, the existing GET_LOD host controls, the 2D-array WARP test and the sample-LOD WARP test. WARP reported zero debug-layer warnings and errors. [Pinned Windows build and test log](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45618417407) - I then ran this PR's test and the same source-stamped renderer on Windows 11 24H2 build 26100.9711. WARP (10.0.26100.9711), RTX 4060 (32.0.15.9579) and UHD 770 (32.0.101.5973) each passed seven translated/direct pairs and the ordinary-sampler control. All 45 draws returned a pixel. The local debug layer was unavailable. - Six local host and documentation checks passed. I also tested 12 translated/direct pairs per adapter and the manifest control on RTX 4060, UHD 770 and WARP using the measurement fixture. Exact point-filter half-mip boundaries selected different neighbors on Intel and on WARP/NVIDIA. The regression checks the fractional lower clamp with linear filtering. [Readbacks, versions and replay script](https://github.com/R0Y00/Xbox2Windows/pull/2311#issuecomment-7162845528) The measurement covers desktop D3D12. Native console sampler/view equivalence remains open. Agent environment and model: Codex + GPT-6.2 Astra xhigh.
upstream-sync closed this pull request 2026-11-25 14:04:51 +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!2334
No description provided.