shader: preserve SPIR-V minimum sample LOD in HLSL #798

Merged
R0Y00 merged 1 commit from upstream-pr/804 into main 2026-11-23 06:29:03 +00:00
R0Y00 commented 2026-11-23 06:12:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T06:12:23Z.


Map SPIR-V MinLod to the HLSL sampling clamp in the pinned SPIRV-Cross build and include the patch in the Windows tool cache key. The source-built fixture draws three 2D sample forms against distinct mip colors and rejects the unclamped draw at pixel (0, 0).

Local Release build at 747b21a passed ctest --test-dir out/shader-minlod/pr-build --no-tests=error --output-on-failure -R '^spirv_' (12 passed, zero skips). Windows 11 26200.9974, RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818, debug layer enabled on both.

A separate local archive experiment compiled all 29 previously blocked pixel records to DXIL and created their PSOs on both adapters. Controlled draws with synthetic bindings wrote color for 19 records on both. Seven matched byte for byte and 12 differed. WARP reached a 45-second budget on four records and drew six with no color writes. RTX drew ten with no color writes. The controlled draws compare adapters under the same desktop bindings. Original shader outputs under package bindings remain unverified.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6553466982 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/804). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T06:12:23Z. --- Map SPIR-V `MinLod` to the HLSL sampling clamp in the pinned SPIRV-Cross build and include the patch in the Windows tool cache key. The source-built fixture draws three 2D sample forms against distinct mip colors and rejects the unclamped draw at pixel (0, 0). Local Release build at `747b21a` passed `ctest --test-dir out/shader-minlod/pr-build --no-tests=error --output-on-failure -R '^spirv_'` (12 passed, zero skips). Windows 11 26200.9974, RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818, debug layer enabled on both. A separate local archive experiment compiled all 29 previously blocked pixel records to DXIL and created their PSOs on both adapters. Controlled draws with synthetic bindings wrote color for 19 records on both. Seven matched byte for byte and 12 differed. WARP reached a 45-second budget on four records and drew six with no color writes. RTX drew ten with no color writes. The controlled draws compare adapters under the same desktop bindings. Original shader outputs under package bindings remain unverified.
upstream-sync closed this pull request 2026-11-24 06:44:52 +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!798
No description provided.