Reproduce MinLod readback differences with a source-built texture fixture #803

Open
opened 2026-11-23 06:34:34 +00:00 by R0Y00 · 35 comments
R0Y00 commented 2026-11-23 06:34:34 +00:00 (Migrated from github.com)
Contributor

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


Refs #804. All 29 local records previously blocked by the MinLod operand compiled and built a D3D12 pipeline on WARP and RTX after the bridge fix. Under the tested synthetic bindings 19 wrote color on both adapters. Seven matched byte for byte and twelve had finite floating-point differences. That comparison alone does not identify the cause.

Claim one sampling form or adapter in a comment. Build on #804's source-built mip fixture. Start with one texture containing distinguishable colors at each mip, a defined sampler and coordinates, and one MinLod instruction form. Use an independent expected output with a stated error tolerance if filtering requires one.

  • Run the translated shader and a direct desktop HLSL control on WARP and a physical adapter with the same texture, sampler and coordinates. Record the first differing pixel and channel. Separate finite output differences, unchanged clear values, timeouts and capability skips.
  • Start at an exact mip level. Then vary one dimension such as the clamp near a mip boundary, gradients, or filter. Include a wrong-clamp or swapped-mip negative control and record the expected mismatch.
  • Record the commit, DXC version, flags, adapter and driver, Windows build and debug-layer status. Publish the smallest source-built reproducer with results, or the tested range if the difference stays unreproduced. Keep archive shaders and other binary inputs local.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6553750019 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T06:34:34Z. --- Refs #804. All 29 local records previously blocked by the MinLod operand compiled and built a D3D12 pipeline on WARP and RTX after the bridge fix. Under the tested synthetic bindings 19 wrote color on both adapters. Seven matched byte for byte and twelve had finite floating-point differences. That comparison alone does not identify the cause. Claim one sampling form or adapter in a comment. Build on #804's source-built mip fixture. Start with one texture containing distinguishable colors at each mip, a defined sampler and coordinates, and one MinLod instruction form. Use an independent expected output with a stated error tolerance if filtering requires one. - Run the translated shader and a direct desktop HLSL control on WARP and a physical adapter with the same texture, sampler and coordinates. Record the first differing pixel and channel. Separate finite output differences, unchanged clear values, timeouts and capability skips. - Start at an exact mip level. Then vary one dimension such as the clamp near a mip boundary, gradients, or filter. Include a wrong-clamp or swapped-mip negative control and record the expected mismatch. - Record the commit, DXC version, flags, adapter and driver, Windows build and debug-layer status. Publish the smallest source-built reproducer with results, or the tested range if the difference stays unreproduced. Keep archive shaders and other binary inputs local.
lukaslw-lab commented 2026-11-24 06:49:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T07:12:35Z.


I'll take plain Sample + MinLod on an RTX 3080 Ti (Windows driver 32.0.16.1047) and WARP 1.0.22 (app-local Agility SDK), Windows 10 build 19045, building on #804's mip fixture (spirv_minlod_* passes on both at 66669bb).

  • One texture with a distinct color per mip, an exact-mip clamp first, then a fractional clamp near a mip boundary.
  • A direct desktop HLSL control and a swapped-mip negative control.
  • Report the first differing pixel and channel, or the tested range if nothing reproduces.

Shared code I expect to touch: tests/spirv_window/minlod.py and the quad-LOD check in tests/pixel_aot_render.cpp.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7094093535 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7094093535). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T07:12:35Z. --- I'll take plain `Sample` + `MinLod` on an RTX 3080 Ti (Windows driver 32.0.16.1047) and WARP 1.0.22 (app-local Agility SDK), Windows 10 build 19045, building on #804's mip fixture (`spirv_minlod_*` passes on both at `66669bb`). - One texture with a distinct color per mip, an exact-mip clamp first, then a fractional clamp near a mip boundary. - A direct desktop HLSL control and a swapped-mip negative control. - Report the first differing pixel and channel, or the tested range if nothing reproduces. Shared code I expect to touch: `tests/spirv_window/minlod.py` and the quad-LOD check in `tests/pixel_aot_render.cpp`. AI-assisted (Claude Code).
lukaslw-lab commented 2026-11-24 06:49:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T07:41:35Z.


Results for plain Sample + MinLod are in #816. Translated and direct-HLSL results are bit-identical on each adapter. The RTX/WARP differences appear only with linear mip filtering, where the adapters quantize the mip blend weight differently.

Windows 10 build 19045, Agility SDK 1.620.2, DXC 1.9.2609, at af94238:

Clamp (MIN_MAG_POINT_MIP_LINEAR) Exact green, blue WARP 1.0.22 RTX 3080 Ti (32.0.16.1047)
1.25 0.75, 0.25 exact 0.7499962, 0.2500038
1.3 0.7, 0.3 0.6992188, 0.3007813 0.7031205, 0.2968795
1.001953125 0.9980469, 0.0019531 1, 0 1, 0
  • Point mip filtering: clamps 0–3, 1.4375, 1.5625 and 3.75 read the nearest mip exactly on both adapters. The 1.5 tie read mip 2 on both.
  • Linear mip filtering: both adapters use 1/256 weight steps. At 1.3 the results match WARP rounding the weight (77/256) and the RTX truncating it (76/256), and the RTX adds up to 7.6e-6.
  • Negative controls: a wrong mip and a wrong blend both fail at pixel (0, 0).
  • Not established: whether this explains the twelve archive differences, since their sampler state and coordinates aren't known here. The 1/128 test tolerance comes from these measurements, not from a specified precision.
  • Still open for others: AMD and Intel adapters, and the SampleBias, SampleGrad and SampleCmp forms.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7094600060 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7094600060). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T07:41:35Z. --- Results for plain `Sample` + `MinLod` are in #816. Translated and direct-HLSL results are bit-identical on each adapter. The RTX/WARP differences appear only with linear mip filtering, where the adapters quantize the mip blend weight differently. Windows 10 build 19045, Agility SDK 1.620.2, DXC 1.9.2609, at `af94238`: | Clamp (`MIN_MAG_POINT_MIP_LINEAR`) | Exact green, blue | WARP 1.0.22 | RTX 3080 Ti (32.0.16.1047) | |---|---|---|---| | 1.25 | 0.75, 0.25 | exact | 0.7499962, 0.2500038 | | 1.3 | 0.7, 0.3 | 0.6992188, 0.3007813 | 0.7031205, 0.2968795 | | 1.001953125 | 0.9980469, 0.0019531 | 1, 0 | 1, 0 | - **Point mip filtering:** clamps 0–3, 1.4375, 1.5625 and 3.75 read the nearest mip exactly on both adapters. The 1.5 tie read mip 2 on both. - **Linear mip filtering:** both adapters use 1/256 weight steps. At 1.3 the results match WARP rounding the weight (77/256) and the RTX truncating it (76/256), and the RTX adds up to 7.6e-6. - **Negative controls:** a wrong mip and a wrong blend both fail at pixel (0, 0). - **Not established:** whether this explains the twelve archive differences, since their sampler state and coordinates aren't known here. The 1/128 test tolerance comes from these measurements, not from a specified precision. - **Still open for others:** AMD and Intel adapters, and the `SampleBias`, `SampleGrad` and `SampleCmp` forms. AI-assisted (Claude Code).
stan495 commented 2026-11-24 06:49:04 +00:00 (Migrated from github.com)
Author
Contributor

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


I reproduced #816's source-built Sample + MinLod fixture on a Radeon RX 7900 XTX and Windows in-box WARP. Both spirv_minlod_levels_* tests passed at af942385c9561a9ee4d5d202d79bae9a084fb87f, with zero capability skips.

The first pixel (0, 0) with MIN_MAG_POINT_MIP_LINEAR returned these G/B values for both the translated shader and the direct HLSL control.

Clamp RX 7900 XTX G / B In-box WARP G / B
1.25 0.75 / 0.25 0.75 / 0.25
1.3 0.69921875 / 0.30078125 0.69921875 / 0.30078125
1.001953125 1 / 0 1 / 0

The unmodified fixture passed on both backends. A second run logged every raw RGBA word alongside the existing 1/128 reference comparison. For each of the nine linear-mip clamps, all 64 pixels (256 channel words) were bit-identical between the translated shader and the direct HLSL control on each backend. The Radeon and this WARP also matched each other across all nine linear-mip readbacks. At 1.3, the blue weight was exactly 77/256, matching the WARP result reported in #816. At 1.001953125 both backends returned the unmixed green mip.

Point mip filtering matched the expected colors exactly, with the 1.5 tie selecting mip 2 on both backends for both shaders. Both negative controls returned the expected renderer exit code 1 at pixel (0, 0) for both shaders on both backends. The first differing channel was G (channel 1) in each case.

Negative control Expected G / B Actual G / B
Clamp 1 checked against mip 2 0 / 1 1 / 0
Clamp 1.25 checked against the 1.5 blend 0.5 / 0.5 0.75 / 0.25

Windows 11 Pro 25H2 build 26200.9974, Ryzen 7 7800X3D, Radeon RX 7900 XTX driver 32.0.32029.2010. The renderer confirmed AMD Radeon RX 7900 XTX (1002:744c) for hardware and Microsoft Basic Render Driver for WARP. WARP came from Windows System32\d3d10warp.dll version 10.0.26100.9818. The D3D12 debug layer was enabled on both backends. DXC was 1.8.2502.11 (239921522) from Windows SDK 10.0.26100.0.

.\tools\setup-spirv-tools.ps1
cmake --preset dev
cmake --build --preset dev --target offscreen_check
$env:XBOX2WINDOWS_ADAPTER = '7900 XTX'
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
ctest --preset dev --no-tests=error -R '^spirv_minlod_levels_(hardware|warp)$' -V

For the diagnostic run, I rebuilt offscreen_check with temporary logging that emits the raw FP32 RGBA channels in raster order. I set X2W_MINLOD_FULL_READBACK=1 and repeated the CTest command above with the diagnostic enabled. The Python check compared 256 channel words per shader for each clamp. The same 1/128 reference tolerance applied.

The bridge used the repository-pinned SPIRV-Tools 262bdab, SPIRV-Headers b824a46, and patched SPIRV-Cross 57e4efc. The fixture assembled and validated with --target-env vulkan1.2, translated with --hlsl --shader-model 66, and compiled with dxc -T ps_6_6 -E main, with -DCLAMP=<clamp> for the HLSL control. These measurements cover the source-built fixture's plain Sample form with constant coordinates and R8G8B8A8_UNORM mips.

AI-assisted. I ran the measurements on the hardware listed above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7095165499 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7095165499). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T08:12:14Z. --- I reproduced #816's source-built `Sample` + `MinLod` fixture on a Radeon RX 7900 XTX and Windows in-box WARP. Both `spirv_minlod_levels_*` tests passed at `af942385c9561a9ee4d5d202d79bae9a084fb87f`, with zero capability skips. The first pixel `(0, 0)` with `MIN_MAG_POINT_MIP_LINEAR` returned these G/B values for both the translated shader and the direct HLSL control. | Clamp | RX 7900 XTX G / B | In-box WARP G / B | |---|---|---| | 1.25 | 0.75 / 0.25 | 0.75 / 0.25 | | 1.3 | 0.69921875 / 0.30078125 | 0.69921875 / 0.30078125 | | 1.001953125 | 1 / 0 | 1 / 0 | The unmodified fixture passed on both backends. A second run logged every raw RGBA word alongside the existing `1/128` reference comparison. For each of the nine linear-mip clamps, all 64 pixels (256 channel words) were bit-identical between the translated shader and the direct HLSL control on each backend. The Radeon and this WARP also matched each other across all nine linear-mip readbacks. At `1.3`, the blue weight was exactly `77/256`, matching the WARP result reported in #816. At `1.001953125` both backends returned the unmixed green mip. Point mip filtering matched the expected colors exactly, with the `1.5` tie selecting mip 2 on both backends for both shaders. Both negative controls returned the expected renderer exit code 1 at pixel `(0, 0)` for both shaders on both backends. The first differing channel was G (channel 1) in each case. | Negative control | Expected G / B | Actual G / B | |---|---|---| | Clamp `1` checked against mip 2 | 0 / 1 | 1 / 0 | | Clamp `1.25` checked against the `1.5` blend | 0.5 / 0.5 | 0.75 / 0.25 | Windows 11 Pro 25H2 build `26200.9974`, Ryzen 7 7800X3D, Radeon RX 7900 XTX driver `32.0.32029.2010`. The renderer confirmed `AMD Radeon RX 7900 XTX` (`1002:744c`) for hardware and `Microsoft Basic Render Driver` for WARP. WARP came from Windows `System32\d3d10warp.dll` version `10.0.26100.9818`. The D3D12 debug layer was enabled on both backends. DXC was `1.8.2502.11` (`239921522`) from Windows SDK `10.0.26100.0`. ```powershell .\tools\setup-spirv-tools.ps1 cmake --preset dev cmake --build --preset dev --target offscreen_check $env:XBOX2WINDOWS_ADAPTER = '7900 XTX' $env:X2W_REQUIRE_SPIRV_TOOLS = '1' ctest --preset dev --no-tests=error -R '^spirv_minlod_levels_(hardware|warp)$' -V ``` For the diagnostic run, I rebuilt `offscreen_check` with temporary logging that emits the raw FP32 RGBA channels in raster order. I set `X2W_MINLOD_FULL_READBACK=1` and repeated the CTest command above with the diagnostic enabled. The Python check compared 256 channel words per shader for each clamp. The same `1/128` reference tolerance applied. The bridge used the repository-pinned SPIRV-Tools `262bdab`, SPIRV-Headers `b824a46`, and patched SPIRV-Cross `57e4efc`. The fixture assembled and validated with `--target-env vulkan1.2`, translated with `--hlsl --shader-model 66`, and compiled with `dxc -T ps_6_6 -E main`, with `-DCLAMP=<clamp>` for the HLSL control. These measurements cover the source-built fixture's plain `Sample` form with constant coordinates and `R8G8B8A8_UNORM` mips. AI-assisted. I ran the measurements on the hardware listed above.
lukaslw-lab commented 2026-11-24 06:49:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T08:15:11Z.


Thanks @stan495, the Radeon run narrows down what #816 left open.

Clamp (MIN_MAG_POINT_MIP_LINEAR) RTX 3080 Ti RX 7900 XTX WARP 1.0.22 and in-box 10.0.26100.9818
1.25 0.7499962 / 0.2500038 0.75 / 0.25 0.75 / 0.25
1.3 0.7031205 / 0.2968795 0.69921875 / 0.30078125 0.69921875 / 0.30078125
  • Of the adapters measured so far, only the RTX 3080 Ti lands on 76/256 at 1.3 and carries the offset of up to 7.6e-6. The Radeon matched WARP bit for bit at all nine linear-mip clamps.
  • Your full readback also covers a gap in #816, which reported only pixel (0, 0): all 64 pixels were bit-identical between the translated shader and the HLSL control on both of your backends.
  • Every adapter stays within the 1/128 tolerance, so the test needs no change.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7095225229 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7095225229). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T08:15:11Z. --- Thanks @stan495, the Radeon run narrows down what #816 left open. | Clamp (`MIN_MAG_POINT_MIP_LINEAR`) | RTX 3080 Ti | RX 7900 XTX | WARP 1.0.22 and in-box 10.0.26100.9818 | |---|---|---|---| | 1.25 | 0.7499962 / 0.2500038 | 0.75 / 0.25 | 0.75 / 0.25 | | 1.3 | 0.7031205 / 0.2968795 | 0.69921875 / 0.30078125 | 0.69921875 / 0.30078125 | - Of the adapters measured so far, only the RTX 3080 Ti lands on 76/256 at 1.3 and carries the offset of up to 7.6e-6. The Radeon matched WARP bit for bit at all nine linear-mip clamps. - Your full readback also covers a gap in #816, which reported only pixel (0, 0): all 64 pixels were bit-identical between the translated shader and the HLSL control on both of your backends. - Every adapter stays within the 1/128 tolerance, so the test needs no change. AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 06:49:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T08:20:13Z.


The plain Sample fixture has landed in #816 (6cd0f15). Thanks @stan495 for checking every pixel on Radeon and in-box WARP. The different linear-mip values are useful evidence of adapter behavior in this fixture. For the next run, keep the same texture and sampler and sweep both sides of the half step between blue weights 76/256 and 77/256. Capture the raw channel words on the same adapter for both the SPIR-V translation and direct HLSL. That would distinguish rounding from truncation more clearly than the single 1.3 measurement. The twelve archive differences remain open pending equivalent sampler and coordinate evidence.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7095327905 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7095327905). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T08:20:13Z. --- The plain `Sample` fixture has landed in #816 (`6cd0f15`). Thanks @stan495 for checking every pixel on Radeon and in-box WARP. The different linear-mip values are useful evidence of adapter behavior in this fixture. For the next run, keep the same texture and sampler and sweep both sides of the half step between blue weights `76/256` and `77/256`. Capture the raw channel words on the same adapter for both the SPIR-V translation and direct HLSL. That would distinguish rounding from truncation more clearly than the single `1.3` measurement. The twelve archive differences remain open pending equivalent sampler and coordinate evidence.
lukaslw-lab commented 2026-11-24 06:49:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T08:32:40Z.


The half-step sweep distinguishes the two: WARP 1.0.22 rounds the blend weight to the nearest 1/256 (ties to even), and the RTX 3080 Ti truncates it. Just above 76.5/256, WARP switches to 77/256, while the RTX stays at 76/256 up to 76.99976/256.

Setup: the #816 fixture at 6cd0f15, with the same texture, sampler (MIN_MAG_POINT_MIP_LINEAR) and tools as #816. Blue weight from 76/256 to 77/256 in 1/4096 steps, plus points just around 76.5/256 and ties at 75.5/256 and 77.5/256. Raw RGBA words of all 64 pixels, for both the SPIR-V translation and the direct HLSL control.

Blue weight × 256 WARP 1.0.22 RTX 3080 Ti (32.0.16.1047)
75.5 (tie) 76 (3e980000) 75 (3e960096)
76.0 to 76.49976 76 (3e980000) 76 (3e980098)
76.5 (tie) 76 (3e980000) 76 (3e980098)
76.50024 to 76.99976 77 (3e9a0000) 76 (3e980098)
77.0 77 (3e9a0000) 77 (3e9a009a)
77.5 (tie) 78 (3e9c0000) 77 (3e9a009a)
  • The ties at 75.5, 76.5 and 77.5 give 76, 76 and 78 on WARP, which is ties to even.
  • On the RTX, the blue word for step k is exactly k·256/65535 and green is 1 − blue. That accounts for the offset of up to 7.6e-6 reported in #816.
  • At every point, all 64 pixels were identical, and the translation matched the HLSL control bit for bit on each adapter.

Windows 10 build 19045, Agility SDK 1.620.2, DXC 1.9.2609, debug layer on.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7095572305 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7095572305). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T08:32:40Z. --- The half-step sweep distinguishes the two: **WARP 1.0.22 rounds the blend weight to the nearest 1/256 (ties to even), and the RTX 3080 Ti truncates it.** Just above 76.5/256, WARP switches to 77/256, while the RTX stays at 76/256 up to 76.99976/256. Setup: the #816 fixture at `6cd0f15`, with the same texture, sampler (`MIN_MAG_POINT_MIP_LINEAR`) and tools as #816. Blue weight from 76/256 to 77/256 in 1/4096 steps, plus points just around 76.5/256 and ties at 75.5/256 and 77.5/256. Raw RGBA words of all 64 pixels, for both the SPIR-V translation and the direct HLSL control. | Blue weight × 256 | WARP 1.0.22 | RTX 3080 Ti (32.0.16.1047) | |---|---|---| | 75.5 (tie) | 76 (`3e980000`) | 75 (`3e960096`) | | 76.0 to 76.49976 | 76 (`3e980000`) | 76 (`3e980098`) | | 76.5 (tie) | 76 (`3e980000`) | 76 (`3e980098`) | | 76.50024 to 76.99976 | 77 (`3e9a0000`) | 76 (`3e980098`) | | 77.0 | 77 (`3e9a0000`) | 77 (`3e9a009a`) | | 77.5 (tie) | 78 (`3e9c0000`) | 77 (`3e9a009a`) | - The ties at 75.5, 76.5 and 77.5 give 76, 76 and 78 on WARP, which is ties to even. - On the RTX, the blue word for step k is exactly `k·256/65535` and green is `1 − blue`. That accounts for the offset of up to 7.6e-6 reported in #816. - At every point, all 64 pixels were identical, and the translation matched the HLSL control bit for bit on each adapter. Windows 10 build 19045, Agility SDK 1.620.2, DXC 1.9.2609, debug layer on. AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 06:49:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T08:53:57Z.


The three tie cases distinguish ties-to-even from half-up on WARP 1.0.22, and the samples just above 76.5/256 distinguish nearest from the RTX 3080 Ti result. This closes the rounding question for those builds and this source-built plain Sample case. The next useful independent sweep is on the RX 7900 XTX and in-box WARP, which matched at the original nine clamps. The twelve archive differences still need matching sampler and coordinate evidence.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7095975067 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7095975067). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T08:53:57Z. --- The three tie cases distinguish ties-to-even from half-up on WARP 1.0.22, and the samples just above 76.5/256 distinguish nearest from the RTX 3080 Ti result. This closes the rounding question for those builds and this source-built plain `Sample` case. The next useful independent sweep is on the RX 7900 XTX and in-box WARP, which matched at the original nine clamps. The twelve archive differences still need matching sampler and coordinate evidence.
R0Y00 commented 2026-11-24 06:49:06 +00:00 (Migrated from github.com)
Author
Contributor

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


#824 adds the SM 6.0 smoke path for Sample, SampleBias with offset and SampleGrad. Its Windows 10 in-box WARP probe also saw point-filtered Sample at clamp 1.5625 read mip 1 in both translated and direct HLSL, while explicit SampleLevel read mip 2. The detailed level/blend fixture remains at SM 6.6. For each independent sweep, please record the runtime and shader model alongside the adapter and sampler so the two point-selection behaviors can be compared on the same inputs.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7096606379 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7096606379). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T09:24:24Z. --- #824 adds the SM 6.0 smoke path for `Sample`, `SampleBias` with offset and `SampleGrad`. Its Windows 10 in-box WARP probe also saw point-filtered `Sample` at clamp 1.5625 read mip 1 in both translated and direct HLSL, while explicit `SampleLevel` read mip 2. The detailed level/blend fixture remains at SM 6.6. For each independent sweep, please record the runtime and shader model alongside the adapter and sampler so the two point-selection behaviors can be compared on the same inputs.
lukaslw-lab commented 2026-11-24 06:49:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T10:02:19Z.


Runtime and shader-model check for #824's point-selection difference, on the #816 four-mip fixture (MIN_MAG_MIP_POINT) at 929e659:

  • Windows 10 build 19045 in-box runtime with in-box WARP 10.0.19041.7811 (SM 6.0) drops the fraction of a MinLod clamp: 0.5625, 1.5, 1.5625, 1.75 and 2.5625 read mips 0, 1, 1, 1 and 2. SampleLevel with the same values reads the nearest mip (1, 2, 2, 2, 3).
  • The RTX 3080 Ti (32.0.16.1047) on the same in-box runtime reads the nearest mip for both, as do WARP 1.0.22 and the RTX under Agility SDK 1.620.2 at both SM 6.0 and SM 6.6. The difference follows the in-box WARP build, not the runtime or shader model.
  • The SPIR-V translation and the direct HLSL control agreed in every case.

For the record, my earlier half-step sweep ran at SM 6.6 (ps_6_6) under Agility SDK 1.620.2 with MIN_MAG_POINT_MIP_LINEAR.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7097414235 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7097414235). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T10:02:19Z. --- Runtime and shader-model check for #824's point-selection difference, on the #816 four-mip fixture (`MIN_MAG_MIP_POINT`) at `929e659`: - Windows 10 build 19045 in-box runtime with in-box WARP 10.0.19041.7811 (SM 6.0) drops the fraction of a `MinLod` clamp: 0.5625, 1.5, 1.5625, 1.75 and 2.5625 read mips 0, 1, 1, 1 and 2. `SampleLevel` with the same values reads the nearest mip (1, 2, 2, 2, 3). - The RTX 3080 Ti (32.0.16.1047) on the same in-box runtime reads the nearest mip for both, as do WARP 1.0.22 and the RTX under Agility SDK 1.620.2 at both SM 6.0 and SM 6.6. The difference follows the in-box WARP build, not the runtime or shader model. - The SPIR-V translation and the direct HLSL control agreed in every case. For the record, my earlier half-step sweep ran at SM 6.6 (`ps_6_6`) under Agility SDK 1.620.2 with `MIN_MAG_POINT_MIP_LINEAR`. AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 06:49:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T10:19:22Z.


Thanks for rerunning the same point-filtered fixture across the two WARP builds and adding the direct HLSL control. Please capture the table in a focused docs PR: list the clamp values and observed mips, the WARP build/runtime and shader model, and keep the mip-linear half-step sweep separate. The result documents a difference between the tested WARP builds. Since translated and direct HLSL agreed, keep the current translator and comparison rules. An independent AMD or Intel result on the same fixture is still welcome.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7097779015 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7097779015). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T10:19:22Z. --- Thanks for rerunning the same point-filtered fixture across the two WARP builds and adding the direct HLSL control. Please capture the table in a focused docs PR: list the clamp values and observed mips, the WARP build/runtime and shader model, and keep the mip-linear half-step sweep separate. The result documents a difference between the tested WARP builds. Since translated and direct HLSL agreed, keep the current translator and comparison rules. An independent AMD or Intel result on the same fixture is still welcome.
R0Y00 commented 2026-11-24 06:49:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T13:26:04Z.


#852 records the point-filter selection table and the separate mip-linear half-step sweep. The translated and direct HLSL results agreed on every tested adapter and runtime. This issue remains open for the same five-clamp point sweep on AMD or Intel at SM 6.0, a Radeon half-step sweep, and evidence linking those measurements to the twelve archive cases.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7102527060 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7102527060). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T13:26:04Z. --- #852 records the point-filter selection table and the separate mip-linear half-step sweep. The translated and direct HLSL results agreed on every tested adapter and runtime. This issue remains open for the same five-clamp point sweep on AMD or Intel at SM 6.0, a Radeon half-step sweep, and evidence linking those measurements to the twelve archive cases.
R0Y00 commented 2026-11-24 06:49:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T15:35:31Z.


#873 has landed. The exact mip and mip-linear cases now run at SM 6.0 with the original pixel checks. The separate SM 6.6 fixture keeps the fractional point cases and reports a capability skip on the older in-box WARP. Both fixtures remain required on the designated CI WARP configuration.

For a follow-up AMD or Intel result, please identify the adapter, driver, WARP or hardware runtime, and report the explicit SampleLevel and MinLod results separately for the five point clamps listed above. The lowered test gate does not answer the archive-correlation question.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7105805164 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7105805164). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T15:35:31Z. --- #873 has landed. The exact mip and mip-linear cases now run at SM 6.0 with the original pixel checks. The separate SM 6.6 fixture keeps the fractional point cases and reports a capability skip on the older in-box WARP. Both fixtures remain required on the designated CI WARP configuration. For a follow-up AMD or Intel result, please identify the adapter, driver, WARP or hardware runtime, and report the explicit SampleLevel and MinLod results separately for the five point clamps listed above. The lowered test gate does not answer the archive-correlation question.
lantiumBot commented 2026-11-24 06:49:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lantiumBot on 2026-11-23T19:21:58Z.


RDNA 4 data point for the source-built MinLod fixtures: AMD Radeon RX 9060 XT and in-box WARP, unmodified tree. Data only, no fixture change.

All six spirv_minlod_* tests passed, with zero capability skips once the pinned SPIR-V tools were built. (With the Vulkan SDK 1.4.363.0 spirv-cross on PATH all six skip with SPIRV-Cross lacks MinLod support.)

Test RX 9060 XT In-box WARP
spirv_minlod PASS PASS
spirv_minlod_levels (ps_6_0) PASS PASS
spirv_minlod_fractional (ps_6_6) PASS PASS

Mip-linear blend (spirv_minlod_levels, ps_6_0), pixel (0, 0)

first_pixel_bits as printed by the fixture. On each backend the SPIR-V translation and the direct HLSL control printed the same words for all nine clamps, and the Radeon matched this WARP on all nine.

Clamp G / B words (both backends, both shaders) G / B
1 3f800000 / 00000000 1 / 0
1.25 3f400000 / 3e800000 0.75 / 0.25
1.3 3f330000 / 3e9a0000 0.69921875 / 0.30078125
1.5 3f000000 / 3f000000 0.5 / 0.5
1.75 3e800000 / 3f400000 0.25 / 0.75
1.00390625 3f7f0000 / 3b800000 0.99609375 / 0.00390625
1.001953125 3f800000 / 00000000 1 / 0
2.5 R, G, B = 3f000000 0.5 each
3.75 R, G = 3f800000, B = 00000000 1 / 1 / 0

At 1.3 the blue weight is exactly 77/256, the value reported above for WARP and the RX 7900 XTX, not the 76/256 of the RTX 3080 Ti.

Point mip selection (spirv_minlod_fractional, ps_6_6, MinLod form)

Same result on both backends, translation and control: clamp 1.4375 read mip 1, 1.5625 read mip 2, 3.75 read mip 3, and the 1.5 tie read mip 2, each with max_absolute_error=0 over 64 pixels.

Negative controls

All returned the expected mismatch at pixel (0, 0) on both backends, for both shaders: clamp 1 checked against mip 2, clamp 1.25 checked against the 1.5 blend, clamp 1.5625 checked against mip 1, and the no-clamp case of spirv_minlod. First differing channel was G (channel 1) for the first three and R (channel 0) for no-clamp.

Environment

  • Commit: 0f0c3eb1f50f227ddc154ab7e081839628ff89b3, clean tree, dev preset (Debug)
  • Adapter: AMD Radeon RX 9060 XT (vendor=1002 device=7590), driver 32.0.32029.2010
  • WARP: Microsoft Basic Render Driver (1414:008c), in-box, driver 10.0.26100.10068
  • Windows build: 26300.10075, in-box D3D12 runtime
  • D3D12 debug layer: unavailable on both backends
  • DXC: 1.9.2602.17 (21d28f727) from Windows SDK 10.0.26100.0
  • SPIR-V tools: repository-pinned SPIRV-Tools 262bdab, SPIRV-Headers b824a46, patched SPIRV-Cross 57e4efc, built with tools/setup-spirv-tools.ps1
.\tools\dev.ps1
.\tools\setup-spirv-tools.ps1
cmake --preset dev -DSPIRV_WINDOW_AS=<bin>/spirv-as.exe -DSPIRV_WINDOW_VAL=<bin>/spirv-val.exe -DSPIRV_WINDOW_CROSS=<bin>/spirv-cross.exe
cmake --build --preset dev
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
ctest --preset dev --no-tests=error -R 'minlod' -V

Five-clamp point sweep at SM 6.0, MinLod and SampleLevel separately

Local driver script (below), not committed. It reuses minlod.spvasm and minlod_control.hlsl unchanged, compiles at ps_6_0, and for each clamp runs --check-pixel-mip-exact against mips 0 to 3 to find the one that reads with max_absolute_error=0 over 64 pixels. The explicit form is OpImageSampleExplicitLod ... Lod for the translation and SampleLevel for the HLSL control. Sampler: MIN_MAG_MIP_POINT.

Clamp 0.5625 1.5 1.5625 1.75 2.5625
RX 9060 XT, MinLod 1 2 2 2 3
RX 9060 XT, SampleLevel 1 2 2 2 3
In-box WARP 10.0.26100.10068, MinLod 1 2 2 2 3
In-box WARP 10.0.26100.10068, SampleLevel 1 2 2 2 3

Exactly one mip matched for every clamp. The translation and the HLSL control agreed in every cell. Both backends read the nearest mip for both forms, so the fraction-dropping MinLod behaviour recorded for in-box WARP 10.0.19041.7811 does not appear on either.

Half-step sweep, mip-linear (MIN_MAG_POINT_MIP_LINEAR), MinLod, ps_6_0

Clamp = 1 + weight/256, passed as an exact binary32 decimal. Blue weight from 76/256 to 77/256 in 1/16 steps, plus 76.5 +/- 1/4096, 77 - 1/4096, and ties at 75.5 and 77.5: 22 points. Blue word of pixel (0, 0) from --check-pixel-mip-blend.

Blue weight x 256 RX 9060 XT In-box WARP 10.0.26100.10068
75.5 (tie) 76 (3e980000) 76 (3e980000)
76.0 to 76.49976 76 (3e980000) 76 (3e980000)
76.5 (tie) 76 (3e980000) 76 (3e980000)
76.50024 to 76.99976 77 (3e9a0000) 77 (3e9a0000)
77.0 77 (3e9a0000) 77 (3e9a0000)
77.5 (tie) 78 (3e9c0000) 78 (3e9c0000)
  • The ties at 75.5, 76.5 and 77.5 give 76, 76 and 78 on both: nearest 1/256 with ties to even. The Radeon does not truncate; 76.50024 already reads 77.
  • Green was 1 - blue with an exact k/256 word at every point (3f340000, 3f330000, 3f320000), with no offset like the RTX 3080 Ti's k*256/65535.
  • All four RGBA words of pixel (0, 0) were identical between the translation and the HLSL control at all 22 points on each backend, and identical between the Radeon and this WARP.

Not measured here

  • Raw words are for pixel (0, 0) only. The other 63 pixels are covered by the fixture's reference comparison (1/128 tolerance for blends, exact for point), not by a bit-for-bit comparison. The printed max_absolute_error over 64 pixels equalled the pixel (0, 0) error at every sweep point, which is consistent with uniform output but does not prove it.
  • One run per backend, one driver, debug layer unavailable. Only the plain Sample form with constant coordinates; no SampleBias, SampleGrad or SampleCmp sweep.
  • Nothing here links these measurements to the twelve archive cases.
Local sweep script (uncommitted)
python -B minlod_sweep.py <repo> <repo>/out/tools/spirv/bin <dxc.exe> <repo>/out/build/dev/offscreen_check.exe hardware
"""Local, uncommitted sweep for issue #809. Reuses the repository fixture inputs unchanged.

Part A: point filter (MIN_MAG_MIP_POINT), ps_6_0, five clamps; which mip is read by MinLod and by
        explicit SampleLevel, for the SPIR-V translation and a direct HLSL control.
Part B: mip-linear filter (MIN_MAG_POINT_MIP_LINEAR), ps_6_0, MinLod; raw first-pixel words around
        the half step between blue weights 76/256 and 77/256.

Usage: minlod_sweep.py <repo> <spirv-bin-dir> <dxc> <offscreen_check> <hardware|warp>
"""
from fractions import Fraction
from pathlib import Path
import struct
import subprocess
import sys
import tempfile

POINT_CLAMPS = ("0.5625", "1.5", "1.5625", "1.75", "2.5625")
# Blue weight * 256 between mip 1 (green) and mip 2 (blue).
STEP = Fraction(1, 4096)
WEIGHTS = ([Fraction(151, 2)] + [Fraction(76) + Fraction(k, 16) for k in range(0, 8)]
           + [Fraction(153, 2) - STEP, Fraction(153, 2), Fraction(153, 2) + STEP]
           + [Fraction(76) + Fraction(k, 16) for k in range(9, 16)]
           + [Fraction(77) - STEP, Fraction(77), Fraction(155, 2)])
TOLERANCE = "0.0078125"
OK = "pixels=64 channels=256 max_absolute_error=0"


def exact_decimal(value: Fraction) -> str:
    number = float(value)
    assert Fraction(number) == value and struct.unpack("<f", struct.pack("<f", number))[0] == number, value
    return format(number, ".25f").rstrip("0")


def main(repo, spirv_bin, dxc, renderer, adapter):
    here = Path(repo) / "tests" / "spirv_window"
    assembler, validator, cross = (str(Path(spirv_bin) / f"{name}.exe") for name in ("spirv-as", "spirv-val", "spirv-cross"))
    template = (here / "minlod.spvasm").read_text(encoding="ascii")
    anchor = "%one = OpConstant %float 1\n"
    control_source = (here / "minlod_control.hlsl").read_text(encoding="ascii")
    forms = {
        "MinLod": ("OpImageSampleImplicitLod %v4 %sampled %uv MinLod %clamp", control_source),
        "SampleLevel": ("OpImageSampleExplicitLod %v4 %sampled %uv Lod %clamp",
                        control_source.replace("color.Sample(pointClamp, float2(0.25, 0.25), int2(0, 0), CLAMP)",
                                               "color.SampleLevel(pointClamp, float2(0.25, 0.25), CLAMP)")),
    }
    assert "SampleLevel(" in forms["SampleLevel"][1]

    with tempfile.TemporaryDirectory() as tmp:
        path = Path(tmp)

        def build(kind, form, clamp):
            sample, hlsl_control = forms[form]
            dxil = path / "shader.dxil"
            if kind == "translated":
                asm, module, hlsl = (path / f"s.{ext}" for ext in ("spvasm", "spv", "hlsl"))
                source = template.replace(anchor, f"{anchor}%clamp = OpConstant %float {clamp}\n")
                asm.write_text(source.replace("@sample@", sample), encoding="ascii")
                subprocess.run([assembler, "--target-env", "vulkan1.2", asm, "-o", module], check=True)
                subprocess.run([validator, "--target-env", "vulkan1.2", module], check=True)
                subprocess.run([cross, module, "--hlsl", "--shader-model", "60", "--output", hlsl], check=True)
                subprocess.run([dxc, "-T", "ps_6_0", "-E", "main", "-Fo", dxil, hlsl], check=True)
            else:
                hlsl = path / "control.hlsl"
                hlsl.write_text(hlsl_control, encoding="ascii")
                subprocess.run([dxc, "-T", "ps_6_0", "-E", "main", f"-DCLAMP={clamp}", "-Fo", dxil, hlsl], check=True)
            return str(dxil)

        def run(*args):
            result = subprocess.run([renderer, adapter, *args], capture_output=True, text=True)
            return result.returncode, result.stdout + result.stderr

        code, output = run("--check-pixel-mip-exact", build("control", "MinLod", "1"), "1")
        for line in output.splitlines():
            if line.startswith(("backend=", "adapter=", "driver=")):
                print(line)
        print("profile=ps_6_0")

        print("\n[A] point filter: mip read per clamp")
        for form in forms:
            for kind in ("translated", "control"):
                row = []
                for clamp in POINT_CLAMPS:
                    read = []
                    dxil = build(kind, form, clamp)
                    for level in range(4):
                        code, output = run("--check-pixel-mip-exact", dxil, str(level))
                        if code == 0 and OK in output:
                            read.append(level)
                        elif not (code == 1 and "pixel_mismatch" in output):
                            raise RuntimeError(output)
                    row.append(f"{clamp}->{','.join(map(str, read)) or 'none'}")
                print(f"A form={form} shader={kind} " + " ".join(row), flush=True)

        print("\n[B] mip-linear filter, MinLod: first pixel words per blue weight*256")
        for weight in WEIGHTS:
            clamp = exact_decimal(1 + weight / 256)
            cells = []
            for kind in ("translated", "control"):
                code, output = run("--check-pixel-mip-blend", build(kind, "MinLod", clamp), clamp, TOLERANCE)
                bits = next((l.split("=", 1)[1] for l in output.splitlines() if l.startswith("first_pixel_bits=")), None)
                error = next((l.rsplit("=", 1)[1] for l in output.splitlines() if "max_absolute_error=" in l), None)
                if bits is None:
                    raise RuntimeError(output)
                blue = struct.unpack("<f", struct.pack("<I", int(bits.split(",")[2], 16)))[0]
                cells.append(f"{kind}={bits} blue*256={blue * 256:.6f} exit={code} max_err={error}")
            print(f"B weight={float(weight):.5f} clamp={clamp} " + " | ".join(cells), flush=True)
    return 0


if __name__ == "__main__":
    sys.exit(main(*sys.argv[1:]))

AI-assisted (Claude Code - Fable 5.2 Medium); runs executed locally on the adapter above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7111499476 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7111499476). Originally posted by [lantiumBot](https://github.com/lantiumBot) on 2026-11-23T19:21:58Z. --- RDNA 4 data point for the source-built MinLod fixtures: AMD Radeon RX 9060 XT and in-box WARP, unmodified tree. Data only, no fixture change. All six `spirv_minlod_*` tests passed, with zero capability skips once the pinned SPIR-V tools were built. (With the Vulkan SDK 1.4.363.0 `spirv-cross` on PATH all six skip with `SPIRV-Cross lacks MinLod support`.) | Test | RX 9060 XT | In-box WARP | |---|---|---| | `spirv_minlod` | PASS | PASS | | `spirv_minlod_levels` (ps_6_0) | PASS | PASS | | `spirv_minlod_fractional` (ps_6_6) | PASS | PASS | ### Mip-linear blend (`spirv_minlod_levels`, ps_6_0), pixel (0, 0) `first_pixel_bits` as printed by the fixture. On each backend the SPIR-V translation and the direct HLSL control printed the same words for all nine clamps, and the Radeon matched this WARP on all nine. | Clamp | G / B words (both backends, both shaders) | G / B | |---|---|---| | 1 | `3f800000` / `00000000` | 1 / 0 | | 1.25 | `3f400000` / `3e800000` | 0.75 / 0.25 | | 1.3 | `3f330000` / `3e9a0000` | 0.69921875 / 0.30078125 | | 1.5 | `3f000000` / `3f000000` | 0.5 / 0.5 | | 1.75 | `3e800000` / `3f400000` | 0.25 / 0.75 | | 1.00390625 | `3f7f0000` / `3b800000` | 0.99609375 / 0.00390625 | | 1.001953125 | `3f800000` / `00000000` | 1 / 0 | | 2.5 | R, G, B = `3f000000` | 0.5 each | | 3.75 | R, G = `3f800000`, B = `00000000` | 1 / 1 / 0 | At 1.3 the blue weight is exactly 77/256, the value reported above for WARP and the RX 7900 XTX, not the 76/256 of the RTX 3080 Ti. ### Point mip selection (`spirv_minlod_fractional`, ps_6_6, MinLod form) Same result on both backends, translation and control: clamp 1.4375 read mip 1, 1.5625 read mip 2, 3.75 read mip 3, and the 1.5 tie read mip 2, each with `max_absolute_error=0` over 64 pixels. ### Negative controls All returned the expected mismatch at pixel (0, 0) on both backends, for both shaders: clamp 1 checked against mip 2, clamp 1.25 checked against the 1.5 blend, clamp 1.5625 checked against mip 1, and the `no-clamp` case of `spirv_minlod`. First differing channel was G (channel 1) for the first three and R (channel 0) for `no-clamp`. ### Environment - Commit: `0f0c3eb1f50f227ddc154ab7e081839628ff89b3`, clean tree, `dev` preset (Debug) - Adapter: AMD Radeon RX 9060 XT (vendor=1002 device=7590), driver 32.0.32029.2010 - WARP: Microsoft Basic Render Driver (1414:008c), in-box, driver 10.0.26100.10068 - Windows build: 26300.10075, in-box D3D12 runtime - D3D12 debug layer: unavailable on both backends - DXC: 1.9.2602.17 (21d28f727) from Windows SDK 10.0.26100.0 - SPIR-V tools: repository-pinned SPIRV-Tools `262bdab`, SPIRV-Headers `b824a46`, patched SPIRV-Cross `57e4efc`, built with `tools/setup-spirv-tools.ps1` ```powershell .\tools\dev.ps1 .\tools\setup-spirv-tools.ps1 cmake --preset dev -DSPIRV_WINDOW_AS=<bin>/spirv-as.exe -DSPIRV_WINDOW_VAL=<bin>/spirv-val.exe -DSPIRV_WINDOW_CROSS=<bin>/spirv-cross.exe cmake --build --preset dev $env:X2W_REQUIRE_SPIRV_TOOLS = '1' ctest --preset dev --no-tests=error -R 'minlod' -V ``` ### Five-clamp point sweep at SM 6.0, MinLod and SampleLevel separately Local driver script (below), not committed. It reuses `minlod.spvasm` and `minlod_control.hlsl` unchanged, compiles at `ps_6_0`, and for each clamp runs `--check-pixel-mip-exact` against mips 0 to 3 to find the one that reads with `max_absolute_error=0` over 64 pixels. The explicit form is `OpImageSampleExplicitLod ... Lod` for the translation and `SampleLevel` for the HLSL control. Sampler: MIN_MAG_MIP_POINT. | Clamp | 0.5625 | 1.5 | 1.5625 | 1.75 | 2.5625 | |---|---|---|---|---|---| | RX 9060 XT, MinLod | 1 | 2 | 2 | 2 | 3 | | RX 9060 XT, SampleLevel | 1 | 2 | 2 | 2 | 3 | | In-box WARP 10.0.26100.10068, MinLod | 1 | 2 | 2 | 2 | 3 | | In-box WARP 10.0.26100.10068, SampleLevel | 1 | 2 | 2 | 2 | 3 | Exactly one mip matched for every clamp. The translation and the HLSL control agreed in every cell. Both backends read the nearest mip for both forms, so the fraction-dropping MinLod behaviour recorded for in-box WARP 10.0.19041.7811 does not appear on either. ### Half-step sweep, mip-linear (MIN_MAG_POINT_MIP_LINEAR), MinLod, ps_6_0 Clamp = 1 + weight/256, passed as an exact binary32 decimal. Blue weight from 76/256 to 77/256 in 1/16 steps, plus 76.5 +/- 1/4096, 77 - 1/4096, and ties at 75.5 and 77.5: 22 points. Blue word of pixel (0, 0) from `--check-pixel-mip-blend`. | Blue weight x 256 | RX 9060 XT | In-box WARP 10.0.26100.10068 | |---|---|---| | 75.5 (tie) | 76 (`3e980000`) | 76 (`3e980000`) | | 76.0 to 76.49976 | 76 (`3e980000`) | 76 (`3e980000`) | | 76.5 (tie) | 76 (`3e980000`) | 76 (`3e980000`) | | 76.50024 to 76.99976 | 77 (`3e9a0000`) | 77 (`3e9a0000`) | | 77.0 | 77 (`3e9a0000`) | 77 (`3e9a0000`) | | 77.5 (tie) | 78 (`3e9c0000`) | 78 (`3e9c0000`) | - The ties at 75.5, 76.5 and 77.5 give 76, 76 and 78 on both: nearest 1/256 with ties to even. The Radeon does not truncate; 76.50024 already reads 77. - Green was 1 - blue with an exact k/256 word at every point (`3f340000`, `3f330000`, `3f320000`), with no offset like the RTX 3080 Ti's k*256/65535. - All four RGBA words of pixel (0, 0) were identical between the translation and the HLSL control at all 22 points on each backend, and identical between the Radeon and this WARP. ### Not measured here - Raw words are for pixel (0, 0) only. The other 63 pixels are covered by the fixture's reference comparison (1/128 tolerance for blends, exact for point), not by a bit-for-bit comparison. The printed `max_absolute_error` over 64 pixels equalled the pixel (0, 0) error at every sweep point, which is consistent with uniform output but does not prove it. - One run per backend, one driver, debug layer unavailable. Only the plain Sample form with constant coordinates; no SampleBias, SampleGrad or SampleCmp sweep. - Nothing here links these measurements to the twelve archive cases. <details> <summary>Local sweep script (uncommitted)</summary> ```powershell python -B minlod_sweep.py <repo> <repo>/out/tools/spirv/bin <dxc.exe> <repo>/out/build/dev/offscreen_check.exe hardware ``` ```python """Local, uncommitted sweep for issue #809. Reuses the repository fixture inputs unchanged. Part A: point filter (MIN_MAG_MIP_POINT), ps_6_0, five clamps; which mip is read by MinLod and by explicit SampleLevel, for the SPIR-V translation and a direct HLSL control. Part B: mip-linear filter (MIN_MAG_POINT_MIP_LINEAR), ps_6_0, MinLod; raw first-pixel words around the half step between blue weights 76/256 and 77/256. Usage: minlod_sweep.py <repo> <spirv-bin-dir> <dxc> <offscreen_check> <hardware|warp> """ from fractions import Fraction from pathlib import Path import struct import subprocess import sys import tempfile POINT_CLAMPS = ("0.5625", "1.5", "1.5625", "1.75", "2.5625") # Blue weight * 256 between mip 1 (green) and mip 2 (blue). STEP = Fraction(1, 4096) WEIGHTS = ([Fraction(151, 2)] + [Fraction(76) + Fraction(k, 16) for k in range(0, 8)] + [Fraction(153, 2) - STEP, Fraction(153, 2), Fraction(153, 2) + STEP] + [Fraction(76) + Fraction(k, 16) for k in range(9, 16)] + [Fraction(77) - STEP, Fraction(77), Fraction(155, 2)]) TOLERANCE = "0.0078125" OK = "pixels=64 channels=256 max_absolute_error=0" def exact_decimal(value: Fraction) -> str: number = float(value) assert Fraction(number) == value and struct.unpack("<f", struct.pack("<f", number))[0] == number, value return format(number, ".25f").rstrip("0") def main(repo, spirv_bin, dxc, renderer, adapter): here = Path(repo) / "tests" / "spirv_window" assembler, validator, cross = (str(Path(spirv_bin) / f"{name}.exe") for name in ("spirv-as", "spirv-val", "spirv-cross")) template = (here / "minlod.spvasm").read_text(encoding="ascii") anchor = "%one = OpConstant %float 1\n" control_source = (here / "minlod_control.hlsl").read_text(encoding="ascii") forms = { "MinLod": ("OpImageSampleImplicitLod %v4 %sampled %uv MinLod %clamp", control_source), "SampleLevel": ("OpImageSampleExplicitLod %v4 %sampled %uv Lod %clamp", control_source.replace("color.Sample(pointClamp, float2(0.25, 0.25), int2(0, 0), CLAMP)", "color.SampleLevel(pointClamp, float2(0.25, 0.25), CLAMP)")), } assert "SampleLevel(" in forms["SampleLevel"][1] with tempfile.TemporaryDirectory() as tmp: path = Path(tmp) def build(kind, form, clamp): sample, hlsl_control = forms[form] dxil = path / "shader.dxil" if kind == "translated": asm, module, hlsl = (path / f"s.{ext}" for ext in ("spvasm", "spv", "hlsl")) source = template.replace(anchor, f"{anchor}%clamp = OpConstant %float {clamp}\n") asm.write_text(source.replace("@sample@", sample), encoding="ascii") subprocess.run([assembler, "--target-env", "vulkan1.2", asm, "-o", module], check=True) subprocess.run([validator, "--target-env", "vulkan1.2", module], check=True) subprocess.run([cross, module, "--hlsl", "--shader-model", "60", "--output", hlsl], check=True) subprocess.run([dxc, "-T", "ps_6_0", "-E", "main", "-Fo", dxil, hlsl], check=True) else: hlsl = path / "control.hlsl" hlsl.write_text(hlsl_control, encoding="ascii") subprocess.run([dxc, "-T", "ps_6_0", "-E", "main", f"-DCLAMP={clamp}", "-Fo", dxil, hlsl], check=True) return str(dxil) def run(*args): result = subprocess.run([renderer, adapter, *args], capture_output=True, text=True) return result.returncode, result.stdout + result.stderr code, output = run("--check-pixel-mip-exact", build("control", "MinLod", "1"), "1") for line in output.splitlines(): if line.startswith(("backend=", "adapter=", "driver=")): print(line) print("profile=ps_6_0") print("\n[A] point filter: mip read per clamp") for form in forms: for kind in ("translated", "control"): row = [] for clamp in POINT_CLAMPS: read = [] dxil = build(kind, form, clamp) for level in range(4): code, output = run("--check-pixel-mip-exact", dxil, str(level)) if code == 0 and OK in output: read.append(level) elif not (code == 1 and "pixel_mismatch" in output): raise RuntimeError(output) row.append(f"{clamp}->{','.join(map(str, read)) or 'none'}") print(f"A form={form} shader={kind} " + " ".join(row), flush=True) print("\n[B] mip-linear filter, MinLod: first pixel words per blue weight*256") for weight in WEIGHTS: clamp = exact_decimal(1 + weight / 256) cells = [] for kind in ("translated", "control"): code, output = run("--check-pixel-mip-blend", build(kind, "MinLod", clamp), clamp, TOLERANCE) bits = next((l.split("=", 1)[1] for l in output.splitlines() if l.startswith("first_pixel_bits=")), None) error = next((l.rsplit("=", 1)[1] for l in output.splitlines() if "max_absolute_error=" in l), None) if bits is None: raise RuntimeError(output) blue = struct.unpack("<f", struct.pack("<I", int(bits.split(",")[2], 16)))[0] cells.append(f"{kind}={bits} blue*256={blue * 256:.6f} exit={code} max_err={error}") print(f"B weight={float(weight):.5f} clamp={clamp} " + " | ".join(cells), flush=True) return 0 if __name__ == "__main__": sys.exit(main(*sys.argv[1:])) ``` </details> AI-assisted (Claude Code - Fable 5.2 Medium); runs executed locally on the adapter above.
R0Y00 commented 2026-11-24 06:49:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T19:30:25Z.


Thanks for separating the two point-sampling forms and recording the raw words. The RX 9060 XT and this in-box WARP agree on all five point clamps for both forms. The blend sweep also distinguishes round-to-even at the 76.5/256 tie from the result just above it. This answers the requested AMD source-built follow-up. The remaining question is whether an independently reproducible binding and sample form can connect those behaviors to any of the twelve earlier differences. The new results do not call for changing a fixture tolerance.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7111702555 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7111702555). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T19:30:25Z. --- Thanks for separating the two point-sampling forms and recording the raw words. The RX 9060 XT and this in-box WARP agree on all five point clamps for both forms. The blend sweep also distinguishes round-to-even at the 76.5/256 tie from the result just above it. This answers the requested AMD source-built follow-up. The remaining question is whether an independently reproducible binding and sample form can connect those behaviors to any of the twelve earlier differences. The new results do not call for changing a fixture tolerance.
R0Y00 commented 2026-11-24 06:49:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T00:15:05Z.


#1059 landed the fixed integer-clamp baseline. I reran the Release fixture on Windows 11 build 26200.9974 with the pinned SPIR-V tools. The translated and native HLSL shaders both matched mip 1 on RTX 4060 Laptop (32.0.16.1656) and WARP (10.0.26100.9818), 64 pixels/256 channels each, with no debug errors or warnings. Both stale-mip controls found the first mismatch at (0,0), channel 1. The original MinLod divergence and the cross-adapter cases remain open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7117867650 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7117867650). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T00:15:05Z. --- #1059 landed the fixed integer-clamp baseline. I reran the Release fixture on Windows 11 build 26200.9974 with the pinned SPIR-V tools. The translated and native HLSL shaders both matched mip 1 on RTX 4060 Laptop (32.0.16.1656) and WARP (10.0.26100.9818), 64 pixels/256 channels each, with no debug errors or warnings. Both stale-mip controls found the first mismatch at (0,0), channel 1. The original MinLod divergence and the cross-adapter cases remain open.
ChazY11 commented 2026-11-24 06:50:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T01:13:35Z.


One sampling form, one adapter: spirv_minlod_fractional passes on WARP and RTX 5080, and reads the wrong mip on Intel Arc 140T

Claiming the spirv_minlod_fractional form on the Intel Arc 140T part of this issue (per "Claim one sampling form
or adapter in a comment"), as an independent tester of the existing fixture.

Results, same build, same tools, three adapters

Build: source 110e186 (working tree 24d5a0c, docs-only diff), dev preset.
Tools: DXC 1.8.2502.11, SPIRV-Tools v2025.5 262bdab4, SPIRV-Cross 57e4efc+ (MinLod patch), MSVC 14.44, Python 3.12.10.
OS: Windows 11 build 26300.9974, debug layer enabled (debug_errors=0 debug_warnings=0 in every run).

test WARP 10.0.26100.9818 RTX 5080 Laptop 32.0.15.8142 Intel Arc 140T 32.0.101.8132
spirv_minlod pass pass pass
spirv_minlod_exact pass pass pass
spirv_minlod_levels pass pass pass
spirv_minlod_fractional pass pass FAIL
$env:XBOX2WINDOWS_ADAPTER = 'Intel'   # or 'NVIDIA'; unset for WARP
ctest --preset dev --no-tests=error -R '^spirv_minlod.*_(warp|hardware)$' -V

First differing pixel and channel, on the Arc

The direct desktop-HLSL control matches first (max_absolute_error=0, 64 pixels × 256 channels). The translated path
then reads mip 1 where the reference expects mip 2 for clamp 1.5625, so the mip-select channel pair swaps:

adapter=Intel(R) Arc(TM) 140T GPU (16GB) vendor=8086 device=7d51
pixels=64 channels=256 max_absolute_error=0
pixel_mismatch x=0 y=0
channel=0 expected=0 actual=0 expected_bits=00000000 actual_bits=00000000
channel=1 expected=0 actual=1 expected_bits=00000000 actual_bits=3f800000
channel=2 expected=1 actual=0 expected_bits=3f800000 actual_bits=00000000
channel=3 expected=1 actual=1 expected_bits=3f800000 actual_bits=3f800000
RuntimeError: translated clamp 1.5625 did not read mip 2

Channels 0 and 3 agree; the mismatch is the pair that encodes which mip was sampled (expected mip 2, got mip 1), at the
first pixel of the 64-pixel draw and at the fractional clamp. That is the "first differing pixel and channel" this
issue asks for, and it separates the two backends cleanly: the direct HLSL control on the same adapter, texture,
sampler and coordinates is exact, so the divergence is in the translated path on this adapter, not in the fixture's
texture or sampler setup.

Stability: the same command on the RTX 5080 and on WARP passes on repeated runs; on the Arc the failure repeats
(ran 3 times while checking #768's fixture on the same adapter, which also fails there).

What I did not cover

  • Only the fractional clamp form, only one adapter. spirv_minlod_exact and spirv_minlod_levels pass here, so the
    other forms are still open.
  • No AMD adapter, so nothing 64-wide.
  • I did not vary gradients or filter, and I did not run the wrong-clamp / swapped-mip negative control on the Arc yet.

Next, if useful

  1. I can run the wrong-clamp and swapped-mip negative controls on the Arc and record the predicted mismatch, so the
    fixture's controls are exercised on the failing adapter rather than only on the passing ones.
  2. I can dump the two readbacks (translated and direct) for the failing clamp and attach them, if the raw words are
    wanted in this thread.
  3. If the clamp value should be probed across the boundary (1.5, 1.5625, 1.99, 2.0), I can run that sweep and report
    which clamps diverge — that would say whether the off-by-one is at the boundary or throughout.

No archive shaders or binary inputs leave this machine; the fixture builds its own texture, sampler and coordinates.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7118887363 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7118887363). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T01:13:35Z. --- ## One sampling form, one adapter: `spirv_minlod_fractional` passes on WARP and RTX 5080, and reads the wrong mip on Intel Arc 140T Claiming the **`spirv_minlod_fractional` form on the Intel Arc 140T** part of this issue (per "Claim one sampling form or adapter in a comment"), as an independent tester of the existing fixture. ### Results, same build, same tools, three adapters Build: source `110e186` (working tree `24d5a0c`, docs-only diff), `dev` preset. Tools: DXC 1.8.2502.11, SPIRV-Tools v2025.5 `262bdab4`, SPIRV-Cross `57e4efc+` (MinLod patch), MSVC 14.44, Python 3.12.10. OS: Windows 11 build 26300.9974, debug layer enabled (`debug_errors=0 debug_warnings=0` in every run). | test | WARP 10.0.26100.9818 | RTX 5080 Laptop 32.0.15.8142 | Intel Arc 140T 32.0.101.8132 | |---|---|---|---| | `spirv_minlod` | pass | pass | pass | | `spirv_minlod_exact` | pass | pass | pass | | `spirv_minlod_levels` | pass | pass | pass | | `spirv_minlod_fractional` | pass | pass | **FAIL** | ```powershell $env:XBOX2WINDOWS_ADAPTER = 'Intel' # or 'NVIDIA'; unset for WARP ctest --preset dev --no-tests=error -R '^spirv_minlod.*_(warp|hardware)$' -V ``` ### First differing pixel and channel, on the Arc The direct desktop-HLSL control matches first (`max_absolute_error=0`, 64 pixels × 256 channels). The translated path then reads mip 1 where the reference expects mip 2 for clamp 1.5625, so the mip-select channel pair swaps: ```text adapter=Intel(R) Arc(TM) 140T GPU (16GB) vendor=8086 device=7d51 pixels=64 channels=256 max_absolute_error=0 pixel_mismatch x=0 y=0 channel=0 expected=0 actual=0 expected_bits=00000000 actual_bits=00000000 channel=1 expected=0 actual=1 expected_bits=00000000 actual_bits=3f800000 channel=2 expected=1 actual=0 expected_bits=3f800000 actual_bits=00000000 channel=3 expected=1 actual=1 expected_bits=3f800000 actual_bits=3f800000 RuntimeError: translated clamp 1.5625 did not read mip 2 ``` Channels 0 and 3 agree; the mismatch is the pair that encodes which mip was sampled (expected mip 2, got mip 1), at the first pixel of the 64-pixel draw and at the fractional clamp. That is the "first differing pixel and channel" this issue asks for, and it separates the two backends cleanly: the direct HLSL control on the same adapter, texture, sampler and coordinates is exact, so the divergence is in the translated path on this adapter, not in the fixture's texture or sampler setup. Stability: the same command on the RTX 5080 and on WARP passes on repeated runs; on the Arc the failure repeats (ran 3 times while checking #768's fixture on the same adapter, which also fails there). ### What I did not cover - Only the fractional clamp form, only one adapter. `spirv_minlod_exact` and `spirv_minlod_levels` pass here, so the other forms are still open. - No AMD adapter, so nothing 64-wide. - I did not vary gradients or filter, and I did not run the wrong-clamp / swapped-mip negative control on the Arc yet. ### Next, if useful 1. I can run the wrong-clamp and swapped-mip negative controls on the Arc and record the predicted mismatch, so the fixture's controls are exercised on the failing adapter rather than only on the passing ones. 2. I can dump the two readbacks (translated and direct) for the failing clamp and attach them, if the raw words are wanted in this thread. 3. If the clamp value should be probed across the boundary (1.5, 1.5625, 1.99, 2.0), I can run that sweep and report which clamps diverge — that would say whether the off-by-one is at the boundary or throughout. No archive shaders or binary inputs leave this machine; the fixture builds its own texture, sampler and coordinates.
ChazY11 commented 2026-11-24 06:50:02 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T01:26:32Z.


The clamp rounding itself differs per adapter, and the translated path matches the control on all three

Follow-up to my earlier comment on this issue. I swept the clamp instead of checking the fixture's one expected mip
per value, using an independent driver of my own (not a change to the repository): for each clamp it builds the
translated module and the direct HLSL control, then tries mip 0–3 and reports the one that matches. Same build,
same tools, three adapters.

adapter=hardware profile=ps_6_6      (operation --check-pixel-mip-clamp, 4 mips, solid colours)

clamp     Intel Arc 140T      NVIDIA RTX 5080 Laptop      WARP
0.4375          0                      0                    0
0.5             0                      1                    1
0.99            0                      1                    1
1               1                      1                    1
1.25            1                      1                    1
1.4375          1                      1                    1
1.5             1                      2                    2
1.5625          1                      2                    2
1.6             1                      2                    2
1.75            1                      2                    2
1.9             1                      2                    2
1.99            1                      2                    2
2               2                      2                    2
2.25            2                      2                    2
2.5             2                      3                    3
3               3                      3                    3
3.49            3                      3                    3
3.5             3                      3                    3
3.75            3                      3                    3

Two things fall out of it:

  1. The translated path and the direct HLSL control agree at every clamp on every adapter (agree=yes in all 57
    rows). So this is not a SPIR-V → HLSL bridge difference. spirv_minlod_fractional fails on the Arc because the
    expectation in FRACTIONAL encodes nearest-mip selection, and this adapter does not do nearest-mip selection.
  2. The rounding rule differs per adapter. RTX 5080 Laptop and WARP select floor(clamp + 0.5) (0.5 → 1,
    1.5 → 2, 2.5 → 3); Intel Arc 140T selects floor(clamp) (0.5 → 0, 1.5 → 1, 2.5 → 2). Both saturate at
    mip 3 for clamps at or above 3, so the tables meet there.

That makes FRACTIONAL = (("1.4375", 1), ("1.5625", 2), ("3.75", 3)) a statement about nearest-mip adapters:
1.5625 is 2 on the two backends the fixture was developed against and 1 on this one, which is exactly the
translated clamp 1.5625 did not read mip 2 failure I reported. The same applies to TIE = "1.5", which the fixture
treats as "either neighbour, but both paths must agree" — on the Arc both paths say 1, so that part is consistent and
only the absolute expectation is not.

What I can send, your call

  1. A per-adapter rounding record: run one clamp (say 1.5) first and record which mip it reads, then build the
    expectation table from that. Two extra dispatches, and the fractional cases then test translation fidelity rather
    than an adapter's rounding choice — which is the only thing a translated-versus-control comparison can settle.
  2. The sweep as tests/spirv_window/minlod_sweep.py plus a CTest registration, so the table above is reproducible
    and the per-adapter rule is documented as a measured property rather than a constant in the test.
  3. Nothing — if you would rather keep FRACTIONAL strict and treat the Arc as out of scope, say so and I will
    note it in #1115's thread instead.

The two negative controls (WRONG_FRACTIONAL and the wrong-clamp control) still hold on the Arc: with the observed
mip known, the control's mismatch is predicted, which is why the sweep reports a value for every row rather than an
error.

No archive shaders or binary inputs left this machine; the fixture builds its own texture, sampler and coordinates,
and my driver writes only into a temporary directory outside the checkout.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7119102972 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7119102972). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T01:26:32Z. --- ## The clamp rounding itself differs per adapter, and the translated path matches the control on all three Follow-up to my earlier comment on this issue. I swept the clamp instead of checking the fixture's one expected mip per value, using an independent driver of my own (not a change to the repository): for each clamp it builds the translated module **and** the direct HLSL control, then tries mip 0–3 and reports the one that matches. Same build, same tools, three adapters. ```text adapter=hardware profile=ps_6_6 (operation --check-pixel-mip-clamp, 4 mips, solid colours) clamp Intel Arc 140T NVIDIA RTX 5080 Laptop WARP 0.4375 0 0 0 0.5 0 1 1 0.99 0 1 1 1 1 1 1 1.25 1 1 1 1.4375 1 1 1 1.5 1 2 2 1.5625 1 2 2 1.6 1 2 2 1.75 1 2 2 1.9 1 2 2 1.99 1 2 2 2 2 2 2 2.25 2 2 2 2.5 2 3 3 3 3 3 3 3.49 3 3 3 3.5 3 3 3 3.75 3 3 3 ``` Two things fall out of it: 1. **The translated path and the direct HLSL control agree at every clamp on every adapter** (`agree=yes` in all 57 rows). So this is not a SPIR-V → HLSL bridge difference. `spirv_minlod_fractional` fails on the Arc because the *expectation* in `FRACTIONAL` encodes nearest-mip selection, and this adapter does not do nearest-mip selection. 2. **The rounding rule differs per adapter.** RTX 5080 Laptop and WARP select `floor(clamp + 0.5)` (`0.5 → 1`, `1.5 → 2`, `2.5 → 3`); Intel Arc 140T selects `floor(clamp)` (`0.5 → 0`, `1.5 → 1`, `2.5 → 2`). Both saturate at mip 3 for clamps at or above 3, so the tables meet there. That makes `FRACTIONAL = (("1.4375", 1), ("1.5625", 2), ("3.75", 3))` a statement about nearest-mip adapters: `1.5625` is 2 on the two backends the fixture was developed against and 1 on this one, which is exactly the `translated clamp 1.5625 did not read mip 2` failure I reported. The same applies to `TIE = "1.5"`, which the fixture treats as "either neighbour, but both paths must agree" — on the Arc both paths say 1, so that part is consistent and only the absolute expectation is not. ### What I can send, your call 1. **A per-adapter rounding record**: run one clamp (say `1.5`) first and record which mip it reads, then build the expectation table from that. Two extra dispatches, and the fractional cases then test translation fidelity rather than an adapter's rounding choice — which is the only thing a translated-versus-control comparison can settle. 2. **The sweep as `tests/spirv_window/minlod_sweep.py`** plus a CTest registration, so the table above is reproducible and the per-adapter rule is documented as a measured property rather than a constant in the test. 3. **Nothing** — if you would rather keep `FRACTIONAL` strict and treat the Arc as out of scope, say so and I will note it in #1115's thread instead. The two negative controls (`WRONG_FRACTIONAL` and the wrong-clamp control) still hold on the Arc: with the observed mip known, the control's mismatch is predicted, which is why the sweep reports a value for every row rather than an error. No archive shaders or binary inputs left this machine; the fixture builds its own texture, sampler and coordinates, and my driver writes only into a temporary directory outside the checkout.
ChazY11 commented 2026-11-24 06:50:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T01:41:22Z.


The fractional "stale reference" control stops rejecting on a floor-rounding adapter

Small addition to my earlier sweep, because it changes what the acceptance item "include a wrong-clamp or swapped-mip
negative control and record the expected mismatch" can mean on this device class.

I ran the fixture's own two rejection expectations as separate probes: build the translated module and the direct HLSL
control for one clamp, then dispatch each against the mip the control says it must not read. Same build, same
tools, three adapters.

adapter=Intel Arc 140T 32.0.101.8132
  stale_reference  clamp=1.5625  checked_against_mip=1  reads_that_mip=True   control_trips=False
  wrong_mip        clamp=1       checked_against_mip=2  reads_that_mip=False  control_trips=True

adapter=NVIDIA RTX 5080 Laptop 32.0.15.8142
  stale_reference  clamp=1.5625  checked_against_mip=1  reads_that_mip=False  control_trips=True
  wrong_mip        clamp=1       checked_against_mip=2  reads_that_mip=False  control_trips=True

adapter=WARP 10.0.26100.9818
  stale_reference  clamp=1.5625  checked_against_mip=1  reads_that_mip=False  control_trips=True
  wrong_mip        clamp=1       checked_against_mip=2  reads_that_mip=False  control_trips=True

reads_that_mip and control_trips=False hold for both the translated module and the direct HLSL control on the
Arc, so this is not a translation difference: the adapter reads mip 1 at clamp 1.5625 in both, which is exactly the
floor(clamp) rule my earlier table records. The control that was written to catch a stale mip-2 reference therefore
cannot catch anything on this adapter — the device genuinely produces the value the control calls wrong.

Consequences, if it is useful:

  1. WRONG_FRACTIONAL = ("1.5625", 1) is adapter-specific in the strict sense: it asserts nearest-mip selection, not
    only that the two shader sources agree. On a floor-rounding adapter it is not a rejection at all.
  2. The wrong_mip control (clamp 1 must not read mip 2) survives on all three adapters, because floor and nearest
    agree at an exact mip level. That is the control that stays meaningful regardless of the rounding rule.
  3. A control derived from the observed rule (measure one clamp, then require the neighbouring mip to reject) keeps its
    power on both device classes. That is the change I offered as option 1 in my earlier comment; I am not sending it
    as a patch without your direction.

I did not change any fixture or expectation for this; it is a probe from my own driver, kept outside the checkout, and
the current Arc result still stands as a failure.

Environment: same as the earlier comment — Windows 11 build 26300.9974, DXC 1.8.2502.11, SPIRV-Tools 2025.5,
SPIRV-Cross 57e4efc+, debug layer enabled, debug_errors=0 debug_warnings=0 in every run.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7119349577 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7119349577). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T01:41:22Z. --- ## The fractional "stale reference" control stops rejecting on a floor-rounding adapter Small addition to my earlier sweep, because it changes what the acceptance item "include a wrong-clamp or swapped-mip negative control and record the expected mismatch" can mean on this device class. I ran the fixture's own two rejection expectations as separate probes: build the translated module and the direct HLSL control for one clamp, then dispatch each against the mip the control says it must **not** read. Same build, same tools, three adapters. ```text adapter=Intel Arc 140T 32.0.101.8132 stale_reference clamp=1.5625 checked_against_mip=1 reads_that_mip=True control_trips=False wrong_mip clamp=1 checked_against_mip=2 reads_that_mip=False control_trips=True adapter=NVIDIA RTX 5080 Laptop 32.0.15.8142 stale_reference clamp=1.5625 checked_against_mip=1 reads_that_mip=False control_trips=True wrong_mip clamp=1 checked_against_mip=2 reads_that_mip=False control_trips=True adapter=WARP 10.0.26100.9818 stale_reference clamp=1.5625 checked_against_mip=1 reads_that_mip=False control_trips=True wrong_mip clamp=1 checked_against_mip=2 reads_that_mip=False control_trips=True ``` `reads_that_mip` and `control_trips=False` hold for **both** the translated module and the direct HLSL control on the Arc, so this is not a translation difference: the adapter reads mip 1 at clamp 1.5625 in both, which is exactly the `floor(clamp)` rule my earlier table records. The control that was written to catch a stale mip-2 reference therefore cannot catch anything on this adapter — the device genuinely produces the value the control calls wrong. Consequences, if it is useful: 1. `WRONG_FRACTIONAL = ("1.5625", 1)` is adapter-specific in the strict sense: it asserts nearest-mip selection, not only that the two shader sources agree. On a floor-rounding adapter it is not a rejection at all. 2. The `wrong_mip` control (`clamp 1` must not read mip 2) survives on all three adapters, because floor and nearest agree at an exact mip level. That is the control that stays meaningful regardless of the rounding rule. 3. A control derived from the observed rule (measure one clamp, then require the neighbouring mip to reject) keeps its power on both device classes. That is the change I offered as option 1 in my earlier comment; I am not sending it as a patch without your direction. I did not change any fixture or expectation for this; it is a probe from my own driver, kept outside the checkout, and the current Arc result still stands as a failure. Environment: same as the earlier comment — Windows 11 build 26300.9974, DXC 1.8.2502.11, SPIRV-Tools 2025.5, SPIRV-Cross `57e4efc+`, debug layer enabled, `debug_errors=0 debug_warnings=0` in every run.
Asimmimx commented 2026-11-24 12:03:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Asimmimx on 2026-11-24T11:24:30Z.


RDNA 2 data point for the MinLod fixtures, including spirv_minlod_fractional. The AMD results in this thread so far are an RX 7900 XTX (RDNA 3) and an RX 9060 XT (RDNA 4). The fractional form has been reported on WARP, the RTX 5080 Laptop and the Intel Arc 140T. Data only, no project change.

Environment

  • Commit 153bb5f6 (main), clean tree, dev preset (Debug)
  • AMD Radeon RX 6600 (1002:73ff, RDNA 2), driver 32.0.21045.29003; WARP 10.0.26100.9818
  • Windows 11 Pro 26H2, build 26300.9974; MSVC 19.51.36260; Windows SDK 10.0.26100.0; DXC 1.8.2502.11
  • D3D12 debug layer enabled, debug_errors=0 debug_warnings=0 on every run
  • SPIR-V tools from tools/setup-spirv-tools.ps1: SPIRV-Tools v2025.5 262bdab4, SPIRV-Cross 57e4efc+ (MinLod patch), passed to CMake as -DSPIRV_WINDOW_AS/VAL/CROSS; X2W_REQUIRE_SPIRV_TOOLS=1

Command and result

ctest --preset dev --no-tests=error -R '^spirv_minlod.*_(warp|hardware)$' -V
Test RX 6600 WARP
spirv_minlod pass 3/3 pass 3/3
spirv_minlod_exact pass 3/3 pass 3/3
spirv_minlod_levels pass 3/3 pass 3/3
spirv_minlod_fractional pass 3/3 pass 3/3

These are the mips that spirv_minlod_fractional_hardware selects on the RX 6600. Every draw reported pixels=64 channels=256 max_absolute_error=0.

translated clamp=1.4375 selected_mip=1
translated clamp=1.5    selected_mip=2
translated clamp=1.5625 selected_mip=2
translated clamp=3.75   selected_mip=3
translated negative clamp=1.5625 mip=0
control negative clamp=1.5625 mip=0

At the clamps this fixture checks, the RX 6600 matches the NVIDIA and WARP columns of the sweep above (1.5 → 2, 1.5625 → 2) and not the Intel column (1 at both clamps). I did not run the independent clamp sweep, so values between these clamps were not measured here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130057343 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7130057343). Originally posted by [Asimmimx](https://github.com/Asimmimx) on 2026-11-24T11:24:30Z. --- RDNA 2 data point for the MinLod fixtures, including `spirv_minlod_fractional`. The AMD results in this thread so far are an RX 7900 XTX (RDNA 3) and an RX 9060 XT (RDNA 4). The fractional form has been reported on WARP, the RTX 5080 Laptop and the Intel Arc 140T. Data only, no project change. ## Environment - Commit `153bb5f6` (`main`), clean tree, `dev` preset (Debug) - AMD Radeon RX 6600 (`1002:73ff`, RDNA 2), driver `32.0.21045.29003`; WARP `10.0.26100.9818` - Windows 11 Pro 26H2, build 26300.9974; MSVC 19.51.36260; Windows SDK 10.0.26100.0; DXC `1.8.2502.11` - D3D12 debug layer enabled, `debug_errors=0 debug_warnings=0` on every run - SPIR-V tools from `tools/setup-spirv-tools.ps1`: SPIRV-Tools v2025.5 `262bdab4`, SPIRV-Cross `57e4efc+` (MinLod patch), passed to CMake as `-DSPIRV_WINDOW_AS/VAL/CROSS`; `X2W_REQUIRE_SPIRV_TOOLS=1` ## Command and result ```powershell ctest --preset dev --no-tests=error -R '^spirv_minlod.*_(warp|hardware)$' -V ``` | Test | RX 6600 | WARP | |---|---|---| | `spirv_minlod` | pass 3/3 | pass 3/3 | | `spirv_minlod_exact` | pass 3/3 | pass 3/3 | | `spirv_minlod_levels` | pass 3/3 | pass 3/3 | | `spirv_minlod_fractional` | pass 3/3 | pass 3/3 | These are the mips that `spirv_minlod_fractional_hardware` selects on the RX 6600. Every draw reported `pixels=64 channels=256 max_absolute_error=0`. ```text translated clamp=1.4375 selected_mip=1 translated clamp=1.5 selected_mip=2 translated clamp=1.5625 selected_mip=2 translated clamp=3.75 selected_mip=3 translated negative clamp=1.5625 mip=0 control negative clamp=1.5625 mip=0 ``` At the clamps this fixture checks, the RX 6600 matches the NVIDIA and WARP columns of the sweep above (1.5 → 2, 1.5625 → 2) and not the Intel column (1 at both clamps). I did not run the independent clamp sweep, so values between these clamps were not measured here. AI-assisted (Claude Code).
SimSalabimse commented 2026-11-24 16:03:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-24T15:22:07Z.


This is the first desktop RTX 40-series (Ada) data point for the MinLod fixtures.

Data only, no fixture change. All eight spirv_minlod_*_(warp|hardware) tests passed on each of three runs. Translated SPIR-V and the direct HLSL control printed the same readback on each adapter.

Environment

  • Commit 6282668987c27f19b8fa08559c674f1b89dac37a (main), clean tree, dev preset (Debug)
  • NVIDIA GeForce RTX 4070 Ti (10de:2782, Ada), Windows driver 32.0.16.2135 (nvidia-smi 621.35); WARP Microsoft Basic Render Driver (1414:008c), driver 10.0.26100.8521
  • Windows 11 25H2, build 26200.8655; MSVC 19.42.34435; Windows SDK 10.0.26100.0; DXC 1.8.2502.11 (239921522)
  • DXC flags from the fixture: -T ps_6_0 -E main for spirv_minlod, spirv_minlod_exact, and spirv_minlod_levels; -T ps_6_6 -E main for spirv_minlod_fractional; the HLSL control adds -DCLAMP=<clamp>
  • D3D12 debug layer enabled on every draw, debug_errors=0 debug_warnings=0. offscreen_check enables the layer when D3D12GetDebugInterface succeeds and has no switch to leave it off, so these runs are the enabled state only
  • SPIR-V tools from tools/setup-spirv-tools.ps1: SPIRV-Tools v2025.5 262bdab, SPIRV-Cross 57e4efc+ (MinLod patch), passed to CMake as SPIRV_WINDOW_AS, SPIRV_WINDOW_VAL, and SPIRV_WINDOW_CROSS

Command and result

$env:XBOX2WINDOWS_ADAPTER = 'NVIDIA'
ctest --preset dev --no-tests=error -R '^spirv_minlod.*_(warp|hardware)$' -V

ctest exit codes: 0, 0, 0. The three verbose logs agreed on every readback below.

Test RTX 4070 Ti In-box WARP
spirv_minlod pass 3/3 pass 3/3
spirv_minlod_exact pass 3/3 pass 3/3
spirv_minlod_levels pass 3/3 pass 3/3
spirv_minlod_fractional pass 3/3 pass 3/3

No capability skips. Accepted draws reported pixels=64 channels=256. Passing draws did not print pixel_mismatch.

Mip-linear blend (spirv_minlod_levels, ps_6_0), pixel (0, 0)

first_pixel_bits as printed. On each adapter the translated shader and the direct HLSL control used the same words for all nine clamps.

Clamp RTX 4070 Ti G / B words RTX 4070 Ti G / B WARP G / B words WARP G / B
1 3f800000 / 00000000 1 / 0 3f800000 / 00000000 1 / 0
1.25 3f3fffc0 / 3e800080 0.749996185 / 0.250003815 3f400000 / 3e800000 0.75 / 0.25
1.3 3f33ffb4 / 3e980098 0.70312047 / 0.29687953 3f330000 / 3e9a0000 0.69921875 / 0.30078125
1.5 3f000080 / 3f000080 0.500007629 / 0.500007629 3f000000 / 3f000000 0.5 / 0.5
1.75 3e800080 / 3f3fffc0 0.250003815 / 0.749996185 3e800000 / 3f400000 0.25 / 0.75
1.00390625 3f7effff / 3b800080 0.99609369 / 0.0039063096 3f7f0000 / 3b800000 0.99609375 / 0.00390625
1.001953125 3f800000 / 00000000 1 / 0 3f800000 / 00000000 1 / 0
2.5 R, G, B = 3f000080 0.500007629 each R, G, B = 3f000000 0.5 each
3.75 R, G = 3f800000, B = 00000000 1 / 1 / 0 R, G = 3f800000, B = 00000000 1 / 1 / 0

At 1.3 the 4070 Ti blue word is 3e980098, the 76/256 word reported for the RTX 3080 Ti, not the WARP word 3e9a0000 (77/256). This WARP matched the earlier in-box WARP and Radeon words on all nine clamps. Both adapters stayed inside the fixture's 1/128 tolerance. At 1.001953125 both returned the unmixed green mip.

Point mip selection

Integer clamps 0, 1, 2, and 3 read mips 0, 1, 2, and 3 on both adapters, both shaders, with max_absolute_error=0. spirv_minlod_exact clamp 1 read mip 1 the same way.

spirv_minlod_fractional (ps_6_6) selected these mips on both the RTX 4070 Ti and this WARP. Translated and control agreed, and every draw reported pixels=64 channels=256 max_absolute_error=0.

translated clamp=1.4375 selected_mip=1
translated clamp=1.5    selected_mip=2
translated clamp=1.5625 selected_mip=2
translated clamp=3.75   selected_mip=3

That is the nearest-mip column from the earlier sweep (1.5 → 2, 1.5625 → 2), the same side as the RTX 5080 Laptop and WARP, not the Arc 140T floor column (1 at both of those clamps).

Negative controls

Each rejected at pixel (0, 0) on both adapters, for both shaders. The fractional negative control still rejects.

Control First differing channel Expected / actual
spirv_minlod no-clamp R (channel 0) 0 / 1 (00000000 / 3f800000)
Clamp 1 checked against mip 2 G (channel 1) 0 / 1 (00000000 / 3f800000)
Clamp 1.25 checked against the 1.5 blend G (channel 1) 0.5 / 0.749996 on the 4070 Ti (3f000000 / 3f3fffc0); 0.5 / 0.75 on WARP (3f000000 / 3f400000)
Fractional clamp 1.5625 checked against mip 0 R (channel 0) 1 / 0 (3f800000 / 00000000)

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7135906309 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7135906309). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-24T15:22:07Z. --- This is the first desktop RTX 40-series (Ada) data point for the MinLod fixtures. Data only, no fixture change. All eight `spirv_minlod_*_(warp|hardware)` tests passed on each of three runs. Translated SPIR-V and the direct HLSL control printed the same readback on each adapter. ## Environment - Commit `6282668987c27f19b8fa08559c674f1b89dac37a` (`main`), clean tree, `dev` preset (Debug) - NVIDIA GeForce RTX 4070 Ti (`10de:2782`, Ada), Windows driver `32.0.16.2135` (nvidia-smi `621.35`); WARP `Microsoft Basic Render Driver` (`1414:008c`), driver `10.0.26100.8521` - Windows 11 25H2, build `26200.8655`; MSVC 19.42.34435; Windows SDK 10.0.26100.0; DXC `1.8.2502.11` (`239921522`) - DXC flags from the fixture: `-T ps_6_0 -E main` for `spirv_minlod`, `spirv_minlod_exact`, and `spirv_minlod_levels`; `-T ps_6_6 -E main` for `spirv_minlod_fractional`; the HLSL control adds `-DCLAMP=<clamp>` - D3D12 debug layer enabled on every draw, `debug_errors=0 debug_warnings=0`. `offscreen_check` enables the layer when `D3D12GetDebugInterface` succeeds and has no switch to leave it off, so these runs are the enabled state only - SPIR-V tools from `tools/setup-spirv-tools.ps1`: SPIRV-Tools v2025.5 `262bdab`, SPIRV-Cross `57e4efc+` (MinLod patch), passed to CMake as `SPIRV_WINDOW_AS`, `SPIRV_WINDOW_VAL`, and `SPIRV_WINDOW_CROSS` ## Command and result ```powershell $env:XBOX2WINDOWS_ADAPTER = 'NVIDIA' ctest --preset dev --no-tests=error -R '^spirv_minlod.*_(warp|hardware)$' -V ``` ctest exit codes: `0`, `0`, `0`. The three verbose logs agreed on every readback below. | Test | RTX 4070 Ti | In-box WARP | |---|---|---| | `spirv_minlod` | pass 3/3 | pass 3/3 | | `spirv_minlod_exact` | pass 3/3 | pass 3/3 | | `spirv_minlod_levels` | pass 3/3 | pass 3/3 | | `spirv_minlod_fractional` | pass 3/3 | pass 3/3 | No capability skips. Accepted draws reported `pixels=64 channels=256`. Passing draws did not print `pixel_mismatch`. ### Mip-linear blend (`spirv_minlod_levels`, ps_6_0), pixel (0, 0) `first_pixel_bits` as printed. On each adapter the translated shader and the direct HLSL control used the same words for all nine clamps. | Clamp | RTX 4070 Ti G / B words | RTX 4070 Ti G / B | WARP G / B words | WARP G / B | |---|---|---|---|---| | 1 | `3f800000` / `00000000` | 1 / 0 | `3f800000` / `00000000` | 1 / 0 | | 1.25 | `3f3fffc0` / `3e800080` | 0.749996185 / 0.250003815 | `3f400000` / `3e800000` | 0.75 / 0.25 | | 1.3 | `3f33ffb4` / `3e980098` | 0.70312047 / 0.29687953 | `3f330000` / `3e9a0000` | 0.69921875 / 0.30078125 | | 1.5 | `3f000080` / `3f000080` | 0.500007629 / 0.500007629 | `3f000000` / `3f000000` | 0.5 / 0.5 | | 1.75 | `3e800080` / `3f3fffc0` | 0.250003815 / 0.749996185 | `3e800000` / `3f400000` | 0.25 / 0.75 | | 1.00390625 | `3f7effff` / `3b800080` | 0.99609369 / 0.0039063096 | `3f7f0000` / `3b800000` | 0.99609375 / 0.00390625 | | 1.001953125 | `3f800000` / `00000000` | 1 / 0 | `3f800000` / `00000000` | 1 / 0 | | 2.5 | R, G, B = `3f000080` | 0.500007629 each | R, G, B = `3f000000` | 0.5 each | | 3.75 | R, G = `3f800000`, B = `00000000` | 1 / 1 / 0 | R, G = `3f800000`, B = `00000000` | 1 / 1 / 0 | At 1.3 the 4070 Ti blue word is `3e980098`, the 76/256 word reported for the RTX 3080 Ti, not the WARP word `3e9a0000` (77/256). This WARP matched the earlier in-box WARP and Radeon words on all nine clamps. Both adapters stayed inside the fixture's 1/128 tolerance. At 1.001953125 both returned the unmixed green mip. ### Point mip selection Integer clamps 0, 1, 2, and 3 read mips 0, 1, 2, and 3 on both adapters, both shaders, with `max_absolute_error=0`. `spirv_minlod_exact` clamp 1 read mip 1 the same way. `spirv_minlod_fractional` (ps_6_6) selected these mips on both the RTX 4070 Ti and this WARP. Translated and control agreed, and every draw reported `pixels=64 channels=256 max_absolute_error=0`. ```text translated clamp=1.4375 selected_mip=1 translated clamp=1.5 selected_mip=2 translated clamp=1.5625 selected_mip=2 translated clamp=3.75 selected_mip=3 ``` That is the nearest-mip column from the earlier sweep (1.5 → 2, 1.5625 → 2), the same side as the RTX 5080 Laptop and WARP, not the Arc 140T floor column (1 at both of those clamps). ### Negative controls Each rejected at pixel (0, 0) on both adapters, for both shaders. The fractional negative control still rejects. | Control | First differing channel | Expected / actual | |---|---|---| | `spirv_minlod` `no-clamp` | R (channel 0) | 0 / 1 (`00000000` / `3f800000`) | | Clamp 1 checked against mip 2 | G (channel 1) | 0 / 1 (`00000000` / `3f800000`) | | Clamp 1.25 checked against the 1.5 blend | G (channel 1) | 0.5 / 0.749996 on the 4070 Ti (`3f000000` / `3f3fffc0`); 0.5 / 0.75 on WARP (`3f000000` / `3f400000`) | | Fractional clamp 1.5625 checked against mip 0 | R (channel 0) | 1 / 0 (`3f800000` / `00000000`) | AI-Assisted
R0Y00 commented 2026-11-24 16:03:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T15:31:56Z.


Thanks for the desktop Ada data point. This adds three matching RTX 4070 Ti and WARP runs for all eight registered cases, with the translated and direct controls agreeing. Keep the broader issue open for a reproducible mismatch when one is found. Future reports can use the same command and include the first differing clamp and mip.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7136185738 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7136185738). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T15:31:56Z. --- Thanks for the desktop Ada data point. This adds three matching RTX 4070 Ti and WARP runs for all eight registered cases, with the translated and direct controls agreeing. Keep the broader issue open for a reproducible mismatch when one is found. Future reports can use the same command and include the first differing clamp and mip.
ChazY11 commented 2026-11-24 17:02:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T16:46:07Z.


Claiming the Intel Arc adapter slice, and the run produced a reproducible difference at a named clamp and mip, which is what the last comment asked future reports to include.

Environment

  • main at d90dd76b, clean tree, dev preset (Debug), debug layer enabled
  • Intel Arc 140T (8086:7d51), driver 32.0.101.8132; WARP Microsoft Basic Render Driver as the control
  • Windows 11 build 26300.9974, MSVC 14.44.35207, Windows SDK 10.0.26100, DXC 1.8.2502.11
  • Commands: ctest --preset dev -R '^spirv_minlod' -V with XBOX2WINDOWS_ADAPTER=Intel for the physical runs; the _warp cases without it

Result: 8/8 pass on the Arc, and one clamp where the shader disagrees with itself

All eight registered cases pass on the Arc (minlod, exact, levels, fractional, each on hardware and WARP). Translated and direct-HLSL control print identical values in every case, so this is not an AOT-versus-control difference.

The fractional case is where the two backends diverge. Arc, spirv_minlod_fractional_hardware, both translated and control:

clamp=1.4375  mip=1   selected_mip=1
clamp=1.5     mip=2
clamp=1.5     mip=1   selected_mip=1
clamp=1.5625  mip=2
clamp=1.5625  mip=1   selected_mip=1
clamp=3.75    mip=3   selected_mip=3
negative clamp=1.5625  mip=0

WARP, same case, same clamps:

clamp=1.4375  mip=1   selected_mip=1
clamp=1.5     mip=2   selected_mip=2
clamp=1.5625  mip=2   selected_mip=2
clamp=3.75    mip=3   selected_mip=3
negative clamp=1.5625  mip=0

First difference: clamp 1.5, channel/pixel x=0 y=0. On WARP the selected mip equals the sampled mip at both fractional clamps; on the Arc the sampled mip is 2 while the shader's own selected_mip reports 1, and the fixture prints the pair that goes with it:

pixel_mismatch x=0 y=0
AOT color export differs from CPU reference

repeated at clamp=1.5 and clamp=1.5625, and nowhere else.

Two readings, and I cannot separate them from here:

  1. the Arc's MinLod clamp uses a different rounding at the mip boundary, so clamp=1.5 and 1.5625 select mip 2 for the sampled coordinate while the shader-side selection formula still yields 1;
  2. the fixture's own expectation at those two clamps is derived on WARP and the Arc is the odd one out.

What is established is narrower and still useful: on this adapter, at exactly two clamp values that sit on the 1.5 mip boundary, the sampled mip and the reported selection disagree, and that disagreement does not appear on WARP or at 1.4375, 3.75, or the negative control. The negative control (clamp=1.5625 with a swapped mip expectation, printed as mip=0) behaves identically on both backends, so the control itself is not adapter-dependent.

What I did not do

  • No fixture change and no shader change; this is a report only.
  • I did not run release, and I did not vary the filter or gradient dimension, so I cannot say whether the boundary rounding is specific to the bilinear path.
  • I did not identify which instruction in the translated DXIL produces the 2-versus-1 split.

If the useful next step is a minimal reproducer rather than a report, say which of the two readings you want tested first — the boundary rounding (1.5, 1.5625, plus 1.4999 and 1.5001 on both backends) or the expectation source — and I will run that on the same commit.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7138176837 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7138176837). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T16:46:07Z. --- Claiming the Intel Arc adapter slice, and the run produced a reproducible difference at a named clamp and mip, which is what the last comment asked future reports to include. ## Environment - `main` at `d90dd76b`, clean tree, `dev` preset (Debug), debug layer enabled - Intel Arc 140T (`8086:7d51`), driver `32.0.101.8132`; WARP `Microsoft Basic Render Driver` as the control - Windows 11 build `26300.9974`, MSVC 14.44.35207, Windows SDK 10.0.26100, DXC `1.8.2502.11` - Commands: `ctest --preset dev -R '^spirv_minlod' -V` with `XBOX2WINDOWS_ADAPTER=Intel` for the physical runs; the `_warp` cases without it ## Result: 8/8 pass on the Arc, and one clamp where the shader disagrees with itself All eight registered cases pass on the Arc (`minlod`, `exact`, `levels`, `fractional`, each on hardware and WARP). Translated and direct-HLSL control print identical values in every case, so this is not an AOT-versus-control difference. The fractional case is where the two backends diverge. Arc, `spirv_minlod_fractional_hardware`, both translated and control: ```text clamp=1.4375 mip=1 selected_mip=1 clamp=1.5 mip=2 clamp=1.5 mip=1 selected_mip=1 clamp=1.5625 mip=2 clamp=1.5625 mip=1 selected_mip=1 clamp=3.75 mip=3 selected_mip=3 negative clamp=1.5625 mip=0 ``` WARP, same case, same clamps: ```text clamp=1.4375 mip=1 selected_mip=1 clamp=1.5 mip=2 selected_mip=2 clamp=1.5625 mip=2 selected_mip=2 clamp=3.75 mip=3 selected_mip=3 negative clamp=1.5625 mip=0 ``` **First difference: clamp `1.5`, channel/pixel `x=0 y=0`.** On WARP the selected mip equals the sampled mip at both fractional clamps; on the Arc the sampled mip is 2 while the shader's own `selected_mip` reports 1, and the fixture prints the pair that goes with it: ```text pixel_mismatch x=0 y=0 AOT color export differs from CPU reference ``` repeated at `clamp=1.5` and `clamp=1.5625`, and nowhere else. Two readings, and I cannot separate them from here: 1. the Arc's MinLod clamp uses a different rounding at the mip boundary, so `clamp=1.5` and `1.5625` select mip 2 for the sampled coordinate while the shader-side selection formula still yields 1; 2. the fixture's own expectation at those two clamps is derived on WARP and the Arc is the odd one out. What is established is narrower and still useful: on this adapter, at exactly two clamp values that sit on the 1.5 mip boundary, the sampled mip and the reported selection disagree, and that disagreement does not appear on WARP or at 1.4375, 3.75, or the negative control. The negative control (`clamp=1.5625` with a swapped mip expectation, printed as `mip=0`) behaves identically on both backends, so the control itself is not adapter-dependent. ## What I did not do - No fixture change and no shader change; this is a report only. - I did not run `release`, and I did not vary the filter or gradient dimension, so I cannot say whether the boundary rounding is specific to the bilinear path. - I did not identify which instruction in the translated DXIL produces the 2-versus-1 split. If the useful next step is a minimal reproducer rather than a report, say which of the two readings you want tested first — the boundary rounding (`1.5`, `1.5625`, plus `1.4999` and `1.5001` on both backends) or the expectation source — and I will run that on the same commit.
ChazY11 commented 2026-11-24 17:02:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T16:47:00Z.


Correction to my previous comment. I misread the fixture's output and reported an anomaly that is not there. Retracting the "the shader disagrees with itself" and "first difference at clamp 1.5" framing.

What the lines actually are. point_mip() in tests/spirv_window/minlod_levels.py walks the accepted mip set for a clamp in order, printing one clamp=… mip=… line per attempt, and a failed attempt prints pixel_mismatch x=0 y=0 plus the renderer's AOT color export differs from CPU reference line. selected_mip= is the candidate that matched. And FRACTIONAL is declared as

FRACTIONAL = (("1.4375", (1,)), ("1.5", (2, 1)), ("1.5625", (2, 1)), ("3.75", (3,)))

with the comment "listing nearest first" — clamps 1.5 and 1.5625 are expected to land on either mip 2 or mip 1, because adapters differ in which side of the boundary they round. So on the Arc, candidate 2 mismatched and candidate 1 matched, and the fixture passed; on WARP candidate 2 matched immediately. Both are inside the accepted set. My reading turned a two-candidate search into a self-contradiction, and I should have read point_mip before writing the report.

What survives from that run, as data rather than a defect:

Arc 140T, 32.0.101.8132     clamp 1.5 -> mip 1 ;  1.5625 -> mip 1   (lower side of the boundary)
WARP 10.0.26100.9818        clamp 1.5 -> mip 2 ;  1.5625 -> mip 2   (upper side of the boundary)
both                        clamp 1.4375 -> 1 ;  3.75 -> 3 ;  negative clamp 1.5625 -> 0

That is an adapter-level split in which accepted mip a fractional MinLod clamp resolves to: Intel Arc takes the lower side at both boundary clamps, WARP takes the upper. Translated and direct-HLSL control agree on each adapter (selected[clamp] != level raises), so it is not an AOT-versus-control difference. All eight registered cases pass on the Arc; I did not run release, and I did not vary the filter.

I am not claiming this is the discrepancy #809 is looking for: the fixture was written to accept both answers, so nothing failed. If you want this recorded, the useful form is probably a one-line statement in the section that already documents the per-adapter MinLod behaviour, and I can draft it — but I would rather you decide whether "which side of the boundary" belongs in the document at all, since recording it as an expectation would turn today's tolerance into a future failure for the next adapter that picks differently.

Sorry for the noise. The check I skipped was reading point_mip and the accepted-set declaration; both are ten lines from the print I quoted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7138199901 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7138199901). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T16:47:00Z. --- Correction to my previous comment. I misread the fixture's output and reported an anomaly that is not there. Retracting the "the shader disagrees with itself" and "first difference at clamp 1.5" framing. What the lines actually are. `point_mip()` in `tests/spirv_window/minlod_levels.py` walks the accepted mip set for a clamp in order, printing one `clamp=… mip=…` line per attempt, and a failed attempt prints `pixel_mismatch x=0 y=0` plus the renderer's `AOT color export differs from CPU reference` line. `selected_mip=` is the candidate that matched. And `FRACTIONAL` is declared as ```python FRACTIONAL = (("1.4375", (1,)), ("1.5", (2, 1)), ("1.5625", (2, 1)), ("3.75", (3,))) ``` with the comment "listing nearest first" — clamps `1.5` and `1.5625` are *expected* to land on either mip 2 or mip 1, because adapters differ in which side of the boundary they round. So on the Arc, candidate 2 mismatched and candidate 1 matched, and the fixture passed; on WARP candidate 2 matched immediately. Both are inside the accepted set. My reading turned a two-candidate search into a self-contradiction, and I should have read `point_mip` before writing the report. What survives from that run, as data rather than a defect: ```text Arc 140T, 32.0.101.8132 clamp 1.5 -> mip 1 ; 1.5625 -> mip 1 (lower side of the boundary) WARP 10.0.26100.9818 clamp 1.5 -> mip 2 ; 1.5625 -> mip 2 (upper side of the boundary) both clamp 1.4375 -> 1 ; 3.75 -> 3 ; negative clamp 1.5625 -> 0 ``` That is an adapter-level split in which accepted mip a fractional MinLod clamp resolves to: Intel Arc takes the lower side at both boundary clamps, WARP takes the upper. Translated and direct-HLSL control agree on each adapter (`selected[clamp] != level` raises), so it is not an AOT-versus-control difference. All eight registered cases pass on the Arc; I did not run `release`, and I did not vary the filter. I am not claiming this is the discrepancy #809 is looking for: the fixture was written to accept both answers, so nothing failed. If you want this recorded, the useful form is probably a one-line statement in the section that already documents the per-adapter MinLod behaviour, and I can draft it — but I would rather you decide whether "which side of the boundary" belongs in the document at all, since recording it as an expectation would turn today's tolerance into a future failure for the next adapter that picks differently. Sorry for the noise. The check I skipped was reading `point_mip` and the accepted-set declaration; both are ten lines from the print I quoted.
Lifither commented 2026-11-24 20:01:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Lifither on 2026-11-24T19:04:19Z.


Polaris coverage for the public MinLod fixtures. I tested 330df7f09158dc05835784c70b22e16b00d1ec74 on Windows 11 x64 build 26300.9974, Release, clang-cl 23.1.6 with /EHa, Windows SDK 10.0.26100 and DXC 1.9.2609.5. The tools came from the pinned setup script: SPIRV-Tools v2025.5 (262bdab4) and SPIRV-Cross 57e4efc with the project's MinLod patch.

  • Radeon RX 590 Series (1002:67df), driver 31.0.21923.1000.
  • WARP, Microsoft Basic Render Driver (1414:008c), version 10.0.26100.9818.
  • D3D12 debug layer reported unavailable on both.
cmake --build <build> --target offscreen_check
$env:XBOX2WINDOWS_ADAPTER = 'RX 590'
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
ctest --test-dir <build> --no-tests=error -R '^spirv_minlod(_exact|_levels|_fractional)?_(hardware|warp)$' -V
Test prefix RX 590 WARP
spirv_minlod PASS PASS
spirv_minlod_exact PASS PASS
spirv_minlod_levels PASS PASS
spirv_minlod_fractional PASS PASS

Eight passes, zero failures, zero skips. The exact fixture matched mip 1 at clamp 1, and the integer point cases matched mips 0, 1, 2, and 3 at the corresponding clamps. For fractional clamps 1.4375, 1.5, 1.5625, and 3.75, the translated shader and direct HLSL control selected mips 1, 2, 2, and 3 on both adapters. The intentional negative controls behaved as expected.

Source-built fixtures only. Codex assisted with setup, testing and reporting.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7141554616 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7141554616). Originally posted by [Lifither](https://github.com/Lifither) on 2026-11-24T19:04:19Z. --- Polaris coverage for the public MinLod fixtures. I tested `330df7f09158dc05835784c70b22e16b00d1ec74` on Windows 11 x64 build 26300.9974, Release, clang-cl 23.1.6 with `/EHa`, Windows SDK 10.0.26100 and DXC 1.9.2609.5. The tools came from the pinned setup script: SPIRV-Tools v2025.5 (`262bdab4`) and SPIRV-Cross `57e4efc` with the project's MinLod patch. - Radeon RX 590 Series (1002:67df), driver 31.0.21923.1000. - WARP, Microsoft Basic Render Driver (1414:008c), version 10.0.26100.9818. - D3D12 debug layer reported unavailable on both. ```powershell cmake --build <build> --target offscreen_check $env:XBOX2WINDOWS_ADAPTER = 'RX 590' $env:X2W_REQUIRE_SPIRV_TOOLS = '1' ctest --test-dir <build> --no-tests=error -R '^spirv_minlod(_exact|_levels|_fractional)?_(hardware|warp)$' -V ``` | Test prefix | RX 590 | WARP | | --- | --- | --- | | `spirv_minlod` | PASS | PASS | | `spirv_minlod_exact` | PASS | PASS | | `spirv_minlod_levels` | PASS | PASS | | `spirv_minlod_fractional` | PASS | PASS | Eight passes, zero failures, zero skips. The exact fixture matched mip 1 at clamp 1, and the integer point cases matched mips 0, 1, 2, and 3 at the corresponding clamps. For fractional clamps 1.4375, 1.5, 1.5625, and 3.75, the translated shader and direct HLSL control selected mips 1, 2, 2, and 3 on both adapters. The intentional negative controls behaved as expected. Source-built fixtures only. Codex assisted with setup, testing and reporting.
cawnr912 commented 2026-11-24 20:01:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by cawnr912 on 2026-11-24T19:33:35Z.


AMD integrated-GPU coverage for the public MinLod fixtures (RDNA 2 iGPU, device 164e), with an RTX 5070 and WARP on the same machine as controls.

Environment

  • main at ddeaa5ebd11cfc03248c72e5d0dbbe7d005bd20b, clean tree, dev preset (Debug)
  • Windows 11 build 26200.9974
  • MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100, DXC 1.9.2602.17 (SDK-bundled)
  • SPIR-V tools from tools/setup-spirv-tools.ps1: SPIRV-Tools v2025.5 (262bdab4), SPIRV-Cross 57e4efc with the project MinLod patch
  • AMD Radeon(TM) Graphics (1002:164e), driver 31.0.24002.92
  • NVIDIA GeForce RTX 5070 (10de:2f04), driver 32.0.16.2124
  • WARP, Microsoft Basic Render Driver (1414:008c), 10.0.26100.9818
  • D3D12 debug layer: unavailable on all three (Graphics Tools not installed)

Commands

.\tools\dev.ps1
$b = "$PWD/out/tools/spirv/bin".Replace('\', '/')
cmake --preset dev "-DSPIRV_WINDOW_AS=$b/spirv-as.exe" "-DSPIRV_WINDOW_VAL=$b/spirv-val.exe" "-DSPIRV_WINDOW_CROSS=$b/spirv-cross.exe"
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
$env:XBOX2WINDOWS_ADAPTER = 'Radeon'
ctest --preset dev --no-tests=error -R '^spirv_minlod(_exact|_levels|_fractional)?_(hardware|warp)$' -V
$env:XBOX2WINDOWS_ADAPTER = 'RTX 5070'
ctest --preset dev --no-tests=error -R '^spirv_minlod(_exact|_levels|_fractional)?_hardware$' -V

Results

Test prefix Radeon 164e RTX 5070 WARP
spirv_minlod PASS PASS PASS
spirv_minlod_exact PASS PASS PASS
spirv_minlod_levels PASS PASS PASS
spirv_minlod_fractional PASS PASS PASS

12 passes, 0 failures, 0 timeouts, 0 capability skips.

  • Exact: clamp 1 read mip 1 on all 64 pixels and 256 channels with zero absolute error. The stale mip-2 control reported its expected mismatch at pixel (0, 0).
  • Levels: integer clamps 0–3 read mips 0–3. The mip-linear blends stayed within the 1/128 tolerance. The largest error on the Radeon was 0.00195312, the same as on WARP. The largest on the RTX 5070 was 0.00312042. The negative controls rejected at pixel (0, 0).
  • Fractional: on all three backends, for translated SPIR-V and the direct HLSL control:
Clamp Radeon 164e RTX 5070 WARP
1.4375 1 1 1
1.5 2 2 2
1.5625 2 2 2
3.75 3 3 3

The Radeon iGPU picks the nearest mip at the 1.5 and 1.5625 boundaries, the same as the RX 7900 XTX, the RX 9060 XT and current in-box WARP. It does not follow the Arc 140T and Windows 10 WARP, which round down to floor(clamp). The wrong-mip control at 1.5625 rejected mip 0 on all three backends.

Scope

These are the registered fixtures only. I did not run the ps_6_0 five-clamp SampleLevel sweep or the mip-linear half-step sweep from earlier comments, because neither is a registered test. If you'd like one of them on this iGPU, point me to the probe or its arguments and I'll rerun it.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142270743 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7142270743). Originally posted by [cawnr912](https://github.com/cawnr912) on 2026-11-24T19:33:35Z. --- AMD integrated-GPU coverage for the public MinLod fixtures (RDNA 2 iGPU, device 164e), with an RTX 5070 and WARP on the same machine as controls. ## Environment - `main` at `ddeaa5ebd11cfc03248c72e5d0dbbe7d005bd20b`, clean tree, `dev` preset (Debug) - Windows 11 build 26200.9974 - MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100, DXC 1.9.2602.17 (SDK-bundled) - SPIR-V tools from `tools/setup-spirv-tools.ps1`: SPIRV-Tools v2025.5 (`262bdab4`), SPIRV-Cross `57e4efc` with the project MinLod patch - AMD Radeon(TM) Graphics (`1002:164e`), driver 31.0.24002.92 - NVIDIA GeForce RTX 5070 (`10de:2f04`), driver 32.0.16.2124 - WARP, Microsoft Basic Render Driver (`1414:008c`), 10.0.26100.9818 - D3D12 debug layer: unavailable on all three (Graphics Tools not installed) ## Commands ```powershell .\tools\dev.ps1 $b = "$PWD/out/tools/spirv/bin".Replace('\', '/') cmake --preset dev "-DSPIRV_WINDOW_AS=$b/spirv-as.exe" "-DSPIRV_WINDOW_VAL=$b/spirv-val.exe" "-DSPIRV_WINDOW_CROSS=$b/spirv-cross.exe" $env:X2W_REQUIRE_SPIRV_TOOLS = '1' $env:XBOX2WINDOWS_ADAPTER = 'Radeon' ctest --preset dev --no-tests=error -R '^spirv_minlod(_exact|_levels|_fractional)?_(hardware|warp)$' -V $env:XBOX2WINDOWS_ADAPTER = 'RTX 5070' ctest --preset dev --no-tests=error -R '^spirv_minlod(_exact|_levels|_fractional)?_hardware$' -V ``` ## Results | Test prefix | Radeon 164e | RTX 5070 | WARP | | --- | --- | --- | --- | | `spirv_minlod` | PASS | PASS | PASS | | `spirv_minlod_exact` | PASS | PASS | PASS | | `spirv_minlod_levels` | PASS | PASS | PASS | | `spirv_minlod_fractional` | PASS | PASS | PASS | 12 passes, 0 failures, 0 timeouts, 0 capability skips. - **Exact:** clamp 1 read mip 1 on all 64 pixels and 256 channels with zero absolute error. The stale mip-2 control reported its expected mismatch at pixel (0, 0). - **Levels:** integer clamps 0–3 read mips 0–3. The mip-linear blends stayed within the 1/128 tolerance. The largest error on the Radeon was 0.00195312, the same as on WARP. The largest on the RTX 5070 was 0.00312042. The negative controls rejected at pixel (0, 0). - **Fractional:** on all three backends, for translated SPIR-V and the direct HLSL control: | Clamp | Radeon 164e | RTX 5070 | WARP | | --- | --- | --- | --- | | 1.4375 | 1 | 1 | 1 | | 1.5 | 2 | 2 | 2 | | 1.5625 | 2 | 2 | 2 | | 3.75 | 3 | 3 | 3 | The Radeon iGPU picks the nearest mip at the 1.5 and 1.5625 boundaries, the same as the RX 7900 XTX, the RX 9060 XT and current in-box WARP. It does not follow the Arc 140T and Windows 10 WARP, which round down to `floor(clamp)`. The wrong-mip control at 1.5625 rejected mip 0 on all three backends. ## Scope These are the registered fixtures only. I did not run the `ps_6_0` five-clamp `SampleLevel` sweep or the mip-linear half-step sweep from earlier comments, because neither is a registered test. If you'd like one of them on this iGPU, point me to the probe or its arguments and I'll rerun it.
cawnr912 commented 2026-11-24 20:01:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by cawnr912 on 2026-11-24T19:48:43Z.


Follow-up to my MinLod comment above. I ran both of the sweeps the earlier RX 9060 XT comment ran, on the RDNA 2 integrated GPU (1002:164e), with in-box WARP on the same machine as the control. As far as I can tell, this is the first RDNA 2 and first integrated-GPU data for either sweep. The RX 6600 report did not run them.

Environment

Same as my previous comment: main at ddeaa5ebd11cfc03248c72e5d0dbbe7d005bd20b, Windows 11 build 26200.9974, DXC 1.9.2602.17, pinned SPIR-V tools, AMD Radeon(TM) Graphics (1002:164e) driver 31.0.24002.92, WARP 10.0.26100.9818. The D3D12 debug layer was unavailable on both.

Command

This uses the uncommitted minlod_sweep.py from the RX 9060 XT comment above, unmodified (SHA-256 a54d85fa8d9cf28ec1e9da372305ef4e82c2a0bd244561f892b6565804ec4627 for the code block as posted). It reuses minlod.spvasm and minlod_control.hlsl and compiles at ps_6_0.

$env:XBOX2WINDOWS_ADAPTER = 'Radeon'
python -B minlod_sweep.py <repo> <repo>/out/tools/spirv/bin <dxc.exe> <repo>/out/build/dev/offscreen_check.exe hardware
Remove-Item Env:XBOX2WINDOWS_ADAPTER
python -B minlod_sweep.py <repo> <repo>/out/tools/spirv/bin <dxc.exe> <repo>/out/build/dev/offscreen_check.exe warp

Both runs exited 0.

Five-clamp point sweep (MIN_MAG_MIP_POINT, ps_6_0)

Clamp 0.5625 1.5 1.5625 1.75 2.5625
Radeon 164e, MinLod 1 2 2 2 3
Radeon 164e, SampleLevel 1 2 2 2 3
In-box WARP 10.0.26100.9818, MinLod 1 2 2 2 3
In-box WARP 10.0.26100.9818, SampleLevel 1 2 2 2 3

At every clamp, exactly one mip matched all 64 pixels with zero error. The translated shader and the HLSL control agreed in every cell. The Radeon reads the nearest mip for both forms, which matches the RX 9060 XT and is not the floor(clamp) behaviour of the Arc 140T or Windows 10 in-box WARP.

Half-step sweep (MIN_MAG_POINT_MIP_LINEAR, MinLod, ps_6_0)

The sweep covers 22 points with clamp = 1 + weight/256. The table shows the blue word of pixel (0, 0).

Blue weight × 256 Radeon 164e In-box WARP 10.0.26100.9818
75.5 (tie) 76 (3e980000) 76 (3e980000)
76.0 to 76.49976 76 (3e980000) 76 (3e980000)
76.5 (tie) 76 (3e980000) 76 (3e980000)
76.50024 to 76.99976 77 (3e9a0000) 77 (3e9a0000)
77.0 77 (3e9a0000) 77 (3e9a0000)
77.5 (tie) 78 (3e9c0000) 78 (3e9c0000)
  • The RDNA 2 integrated GPU rounds the blend weight to the nearest 1/256 with ties to even, like the RX 9060 XT and WARP. It does not truncate like the RTX 3080 Ti. 76.50024 already reads 77.
  • Green is an exact k/256 word at every point (3f340000, 3f330000, 3f320000), with no k·256/65535 offset.
  • All four RGBA words of pixel (0, 0) were identical between the translated shader and the HLSL control at all 22 points. They were also identical between the Radeon and WARP on every line of both sweeps.

Not measured

  • The raw words are for pixel (0, 0) only. The other 63 pixels are covered by the fixture's comparison, not bit for bit.
  • This is one run per backend on one driver, an older AMD driver, with the debug layer unavailable.
  • I didn't sweep the RTX 5070 on this machine.
  • Nothing here links these results to the archive cases.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142622541 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7142622541). Originally posted by [cawnr912](https://github.com/cawnr912) on 2026-11-24T19:48:43Z. --- Follow-up to my MinLod comment above. I ran both of the sweeps the earlier RX 9060 XT comment ran, on the RDNA 2 integrated GPU (`1002:164e`), with in-box WARP on the same machine as the control. As far as I can tell, this is the first RDNA 2 and first integrated-GPU data for either sweep. The RX 6600 report did not run them. ## Environment Same as my previous comment: `main` at `ddeaa5ebd11cfc03248c72e5d0dbbe7d005bd20b`, Windows 11 build 26200.9974, DXC 1.9.2602.17, pinned SPIR-V tools, AMD Radeon(TM) Graphics (`1002:164e`) driver 31.0.24002.92, WARP 10.0.26100.9818. The D3D12 debug layer was unavailable on both. ## Command This uses the uncommitted `minlod_sweep.py` from the RX 9060 XT comment above, unmodified (SHA-256 `a54d85fa8d9cf28ec1e9da372305ef4e82c2a0bd244561f892b6565804ec4627` for the code block as posted). It reuses `minlod.spvasm` and `minlod_control.hlsl` and compiles at `ps_6_0`. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'Radeon' python -B minlod_sweep.py <repo> <repo>/out/tools/spirv/bin <dxc.exe> <repo>/out/build/dev/offscreen_check.exe hardware Remove-Item Env:XBOX2WINDOWS_ADAPTER python -B minlod_sweep.py <repo> <repo>/out/tools/spirv/bin <dxc.exe> <repo>/out/build/dev/offscreen_check.exe warp ``` Both runs exited 0. ## Five-clamp point sweep (`MIN_MAG_MIP_POINT`, `ps_6_0`) | Clamp | 0.5625 | 1.5 | 1.5625 | 1.75 | 2.5625 | |---|---|---|---|---|---| | Radeon 164e, MinLod | 1 | 2 | 2 | 2 | 3 | | Radeon 164e, SampleLevel | 1 | 2 | 2 | 2 | 3 | | In-box WARP 10.0.26100.9818, MinLod | 1 | 2 | 2 | 2 | 3 | | In-box WARP 10.0.26100.9818, SampleLevel | 1 | 2 | 2 | 2 | 3 | At every clamp, exactly one mip matched all 64 pixels with zero error. The translated shader and the HLSL control agreed in every cell. The Radeon reads the nearest mip for both forms, which matches the RX 9060 XT and is not the `floor(clamp)` behaviour of the Arc 140T or Windows 10 in-box WARP. ## Half-step sweep (`MIN_MAG_POINT_MIP_LINEAR`, MinLod, `ps_6_0`) The sweep covers 22 points with clamp = 1 + weight/256. The table shows the blue word of pixel (0, 0). | Blue weight × 256 | Radeon 164e | In-box WARP 10.0.26100.9818 | |---|---|---| | 75.5 (tie) | 76 (`3e980000`) | 76 (`3e980000`) | | 76.0 to 76.49976 | 76 (`3e980000`) | 76 (`3e980000`) | | 76.5 (tie) | 76 (`3e980000`) | 76 (`3e980000`) | | 76.50024 to 76.99976 | 77 (`3e9a0000`) | 77 (`3e9a0000`) | | 77.0 | 77 (`3e9a0000`) | 77 (`3e9a0000`) | | 77.5 (tie) | 78 (`3e9c0000`) | 78 (`3e9c0000`) | - The RDNA 2 integrated GPU rounds the blend weight to the nearest 1/256 with ties to even, like the RX 9060 XT and WARP. It does not truncate like the RTX 3080 Ti. 76.50024 already reads 77. - Green is an exact k/256 word at every point (`3f340000`, `3f330000`, `3f320000`), with no `k·256/65535` offset. - All four RGBA words of pixel (0, 0) were identical between the translated shader and the HLSL control at all 22 points. They were also identical between the Radeon and WARP on every line of both sweeps. ## Not measured - The raw words are for pixel (0, 0) only. The other 63 pixels are covered by the fixture's comparison, not bit for bit. - This is one run per backend on one driver, an older AMD driver, with the debug layer unavailable. - I didn't sweep the RTX 5070 on this machine. - Nothing here links these results to the archive cases.
lantiumBot commented 2026-11-24 20:01:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lantiumBot on 2026-11-24T19:57:54Z.


RX 9060 XT (RDNA 4) rerun with the fixture from #1059, which was not in my earlier report on this adapter (https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7111499476). No mismatch to report: all eight registered cases pass in 3 of 3 runs. Data only.

  • Commit 68969ed86ac253615a910d24abd0177938584bd0 (main), clean tree, dev preset (Debug)
  • AMD Radeon RX 9060 XT (1002:7590), driver 32.0.32029.2010; in-box WARP 10.0.26100.10068
  • Windows 11 Pro 26H2, build 26300.10075; MSVC 19.52.37029; DXC 1.9.2602.17 (21d28f727)
  • D3D12 debug layer unavailable (debug_layer=unavailable on every draw), so no debug diagnostics are claimed
  • Pinned SPIR-V tools from tools/setup-spirv-tools.ps1, passed to CMake as SPIRV_WINDOW_AS, SPIRV_WINDOW_VAL and SPIRV_WINDOW_CROSS
ctest --preset dev --no-tests=error -R '^spirv_minlod.*_(warp|hardware)$' -V
Test RX 9060 XT WARP
spirv_minlod pass 3/3 pass 3/3
spirv_minlod_exact pass 3/3 pass 3/3
spirv_minlod_levels pass 3/3 pass 3/3
spirv_minlod_fractional pass 3/3 pass 3/3

No capability skip. The lines each test prints were identical across the three runs.

spirv_minlod_exact_hardware (ps_6_0), translated shader and direct HLSL control alike: clamp 1 reads mip 1 with pixels=64 channels=256 max_absolute_error=0, and the stale mip-2 control fails at pixel (0, 0), first differing channel 1 (expected_bits=00000000 actual_bits=3f800000).

spirv_minlod_fractional_hardware, translated and control alike: clamps 1.4375, 1.5, 1.5625 and 3.75 select mips 1, 2, 2 and 3, each with max_absolute_error=0. At 1.5 and 1.5625 the first candidate (mip 2) matched, so this adapter is on the upper side of the boundary, as in my earlier report.

One adapter, one driver.

AI-assisted (Claude Code - Fable 5.2); runs executed locally on the adapter above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142851138 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7142851138). Originally posted by [lantiumBot](https://github.com/lantiumBot) on 2026-11-24T19:57:54Z. --- RX 9060 XT (RDNA 4) rerun with the fixture from #1059, which was not in my earlier report on this adapter (https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7111499476). No mismatch to report: all eight registered cases pass in 3 of 3 runs. Data only. - Commit `68969ed86ac253615a910d24abd0177938584bd0` (`main`), clean tree, `dev` preset (Debug) - AMD Radeon RX 9060 XT (`1002:7590`), driver `32.0.32029.2010`; in-box WARP `10.0.26100.10068` - Windows 11 Pro 26H2, build 26300.10075; MSVC 19.52.37029; DXC `1.9.2602.17 (21d28f727)` - D3D12 debug layer unavailable (`debug_layer=unavailable` on every draw), so no debug diagnostics are claimed - Pinned SPIR-V tools from `tools/setup-spirv-tools.ps1`, passed to CMake as `SPIRV_WINDOW_AS`, `SPIRV_WINDOW_VAL` and `SPIRV_WINDOW_CROSS` ```powershell ctest --preset dev --no-tests=error -R '^spirv_minlod.*_(warp|hardware)$' -V ``` | Test | RX 9060 XT | WARP | |---|---|---| | `spirv_minlod` | pass 3/3 | pass 3/3 | | `spirv_minlod_exact` | pass 3/3 | pass 3/3 | | `spirv_minlod_levels` | pass 3/3 | pass 3/3 | | `spirv_minlod_fractional` | pass 3/3 | pass 3/3 | No capability skip. The lines each test prints were identical across the three runs. `spirv_minlod_exact_hardware` (`ps_6_0`), translated shader and direct HLSL control alike: clamp 1 reads mip 1 with `pixels=64 channels=256 max_absolute_error=0`, and the stale mip-2 control fails at pixel `(0, 0)`, first differing channel 1 (`expected_bits=00000000 actual_bits=3f800000`). `spirv_minlod_fractional_hardware`, translated and control alike: clamps 1.4375, 1.5, 1.5625 and 3.75 select mips 1, 2, 2 and 3, each with `max_absolute_error=0`. At 1.5 and 1.5625 the first candidate (mip 2) matched, so this adapter is on the upper side of the boundary, as in my earlier report. One adapter, one driver. AI-assisted (Claude Code - Fable 5.2); runs executed locally on the adapter above.
RavenCurseBurg commented 2026-11-25 16:05:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T15:33:10Z.


The UHD 770 point-filter measurement is complete. #2412 adds the two fractional lower endpoints and an exact mip-2 anchor. Runnable sweep.

With the four solid-color mips, the same coordinates and point sampler, translated SPIR-V and direct HLSL matched over all 64 pixels at every sampled clamp. I first checked the existing integer/exact and mip-linear cases, then swept [1, 2] at 1/16 spacing and the region where the selected mip changed at 1/256 spacing.

Local adapter Last sampled mip-1 clamp First sampled mip-2 clamp
UHD Graphics 770 (8086:a780, 32.0.101.5973) 1.99609375 2
RTX 4060 (10de:2882, 32.0.15.9579) 1.49609375 1.5
In-box WARP (1414:008c, 10.0.26100.9711) 1.49609375 1.5

Rounding only the translated shader's clamp to the nearest 1/128 before SPIR-V assembly passed the original four fractional cases on every adapter. The new cases caught mip 2 versus mip 1 at 1.99609375 on the UHD and 1.49609375 on RTX and WARP. The deliberate mip-0 reference at clamp 1.5625 failed at pixel (0, 0), channel 0, on all three. This measures a transition on the sampled grid.

Source base 7092683a, Windows 11 build 26100.9711, DXC 1.9.2609.5 at -T ps_6_6 -E main, SPIRV-Tools 262bdab4 and patched SPIRV-Cross 57e4efcc. The local debug layer was unavailable. Hosted WARP with the debug layer also rejected the rounded shader only after adding the new inputs.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7167019483 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7167019483). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T15:33:10Z. --- The UHD 770 point-filter measurement is complete. #2412 adds the two fractional lower endpoints and an exact mip-2 anchor. [Runnable sweep](https://github.com/RavenCurseBurg/Xbox2Windows/blob/cff4c5746d01329c90233824c64393b64ca4d6bd/tests/measure_minlod_point_boundary.py). With the four solid-color mips, the same coordinates and point sampler, translated SPIR-V and direct HLSL matched over all 64 pixels at every sampled clamp. I first checked the existing integer/exact and mip-linear cases, then swept [1, 2] at 1/16 spacing and the region where the selected mip changed at 1/256 spacing. | Local adapter | Last sampled mip-1 clamp | First sampled mip-2 clamp | | --- | ---: | ---: | | UHD Graphics 770 (8086:a780, 32.0.101.5973) | 1.99609375 | 2 | | RTX 4060 (10de:2882, 32.0.15.9579) | 1.49609375 | 1.5 | | In-box WARP (1414:008c, 10.0.26100.9711) | 1.49609375 | 1.5 | Rounding only the translated shader's clamp to the nearest 1/128 before SPIR-V assembly passed the original four fractional cases on every adapter. The new cases caught mip 2 versus mip 1 at 1.99609375 on the UHD and 1.49609375 on RTX and WARP. The deliberate mip-0 reference at clamp 1.5625 failed at pixel (0, 0), channel 0, on all three. This measures a transition on the sampled grid. Source base 7092683a, Windows 11 build 26100.9711, DXC 1.9.2609.5 at `-T ps_6_6 -E main`, SPIRV-Tools 262bdab4 and patched SPIRV-Cross 57e4efcc. The local debug layer was unavailable. [Hosted WARP with the debug layer](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45648415606) also rejected the rounded shader only after adding the new inputs.
JVProg commented 2026-11-25 20:04:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-25T19:43:08Z.


Public MinLod fixtures on RX 9070 XT, with in-box WARP

Environment

  • main at c00697b103f0808283cb92e4b4fe16c6967cac80, clean tree, dev preset (Debug)
  • Windows 11 build 26300.9974
  • MSVC 19.44.35230 (toolset 14.44.35207), CMake 3.31.6, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0)
  • SPIR-V tools built with tools/setup-spirv-tools.ps1: SPIRV-Tools v2025.5 (262bdab4), SPIRV-Cross 57e4efc with the project MinLod patch
  • AMD Radeon RX 9070 XT (1002:7550), driver 32.0.32029.2010
  • WARP, Microsoft Basic Render Driver, 10.0.26100.9818
  • D3D12 debug layer: unavailable on both, so no debug diagnostics are claimed

Commands (after tools\dev.ps1; $b is the tool directory printed by the setup script, with forward slashes)

cmake --preset dev "-DSPIRV_WINDOW_AS=$b/spirv-as.exe" "-DSPIRV_WINDOW_VAL=$b/spirv-val.exe" "-DSPIRV_WINDOW_CROSS=$b/spirv-cross.exe"
cmake --build --preset dev --target offscreen_check
$env:X2W_REQUIRE_SPIRV_TOOLS = '1'
$env:XBOX2WINDOWS_ADAPTER = 'RX 9070'
ctest --preset dev --no-tests=error -j 1 -R '^spirv_minlod.*_(hardware|warp)$' -V

Results: 3 runs, 8/8 passed in each, no skips. The per-test output lines (excluding timeouts and temp paths) were identical across the three runs.

Test RX 9070 XT WARP
spirv_minlod pass 3/3 pass 3/3
spirv_minlod_exact pass 3/3 pass 3/3
spirv_minlod_levels pass 3/3 pass 3/3
spirv_minlod_fractional pass 3/3 pass 3/3

Point filtering, fractional clamps (ps_6_6), same selection for the translated shader and the direct HLSL control on both adapters:

Clamp 1.4375 1.49609375 1.5 1.5625 1.99609375 2 3.75
Selected mip 1 1 2 2 2 2 3

On these sampled points the RX 9070 XT changes from mip 1 to mip 2 between 1.49609375 and 1.5, like the RTX 4060 and WARP rows in the UHD 770 measurement, and unlike the UHD 770, which still read mip 1 at 1.99609375 there. I ran only the registered clamps, not the finer 1/256 sweep.

Mip-linear (ps_6_0): all nine blend clamps passed within the fixture tolerance. The largest reported errors were 0.00195312 at clamp 1.001953125 and 0.000781298 at 1.3; the other seven were 0. The first-pixel bits were the same on the RX 9070 XT and WARP, and matched between the translated shader and the control.

Negative controls: the wrong-mip and wrong-blend references failed at pixel (0, 0) as expected, on both adapters.

No mismatch to report. This is an adapter data point only; it does not explain the differences seen in the original archive records.

AI-assisted (Claude Code): the commands were run locally on my machine.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172675526 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7172675526). Originally posted by [JVProg](https://github.com/JVProg) on 2026-11-25T19:43:08Z. --- ### Public MinLod fixtures on RX 9070 XT, with in-box WARP **Environment** - `main` at `c00697b103f0808283cb92e4b4fe16c6967cac80`, clean tree, `dev` preset (Debug) - Windows 11 build 26300.9974 - MSVC 19.44.35230 (toolset 14.44.35207), CMake 3.31.6, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0) - SPIR-V tools built with `tools/setup-spirv-tools.ps1`: SPIRV-Tools v2025.5 (`262bdab4`), SPIRV-Cross `57e4efc` with the project MinLod patch - AMD Radeon RX 9070 XT (`1002:7550`), driver 32.0.32029.2010 - WARP, Microsoft Basic Render Driver, 10.0.26100.9818 - D3D12 debug layer: unavailable on both, so no debug diagnostics are claimed **Commands** (after `tools\dev.ps1`; `$b` is the tool directory printed by the setup script, with forward slashes) ```powershell cmake --preset dev "-DSPIRV_WINDOW_AS=$b/spirv-as.exe" "-DSPIRV_WINDOW_VAL=$b/spirv-val.exe" "-DSPIRV_WINDOW_CROSS=$b/spirv-cross.exe" cmake --build --preset dev --target offscreen_check $env:X2W_REQUIRE_SPIRV_TOOLS = '1' $env:XBOX2WINDOWS_ADAPTER = 'RX 9070' ctest --preset dev --no-tests=error -j 1 -R '^spirv_minlod.*_(hardware|warp)$' -V ``` **Results:** 3 runs, 8/8 passed in each, no skips. The per-test output lines (excluding timeouts and temp paths) were identical across the three runs. | Test | RX 9070 XT | WARP | | --- | --- | --- | | `spirv_minlod` | pass 3/3 | pass 3/3 | | `spirv_minlod_exact` | pass 3/3 | pass 3/3 | | `spirv_minlod_levels` | pass 3/3 | pass 3/3 | | `spirv_minlod_fractional` | pass 3/3 | pass 3/3 | **Point filtering, fractional clamps (`ps_6_6`)**, same selection for the translated shader and the direct HLSL control on both adapters: | Clamp | 1.4375 | 1.49609375 | 1.5 | 1.5625 | 1.99609375 | 2 | 3.75 | | --- | --- | --- | --- | --- | --- | --- | --- | | Selected mip | 1 | 1 | 2 | 2 | 2 | 2 | 3 | On these sampled points the RX 9070 XT changes from mip 1 to mip 2 between 1.49609375 and 1.5, like the RTX 4060 and WARP rows in the [UHD 770 measurement](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7167019483), and unlike the UHD 770, which still read mip 1 at 1.99609375 there. I ran only the registered clamps, not the finer 1/256 sweep. **Mip-linear (`ps_6_0`):** all nine blend clamps passed within the fixture tolerance. The largest reported errors were 0.00195312 at clamp 1.001953125 and 0.000781298 at 1.3; the other seven were 0. The first-pixel bits were the same on the RX 9070 XT and WARP, and matched between the translated shader and the control. **Negative controls:** the wrong-mip and wrong-blend references failed at pixel (0, 0) as expected, on both adapters. No mismatch to report. This is an adapter data point only; it does not explain the differences seen in the original archive records. AI-assisted (Claude Code): the commands were run locally on my machine.
R0Y00 commented 2026-11-25 20:04:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T19:49:04Z.


Thanks for the matched RX 9070 XT and WARP runs. The translated and direct controls selected mip 2 at 1.5 on both, and the wrong-mip and wrong-blend controls still failed. That adds an RDNA 4 comparison for the tighter UHD 770 boundary in the linked report. Please keep that split as an adapter observation. The open comparison is a source-built case that reproduces one of the original finite differences between the translated and direct paths.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172802928 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7172802928). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T19:49:04Z. --- Thanks for the matched RX 9070 XT and WARP runs. The translated and direct controls selected mip 2 at 1.5 on both, and the wrong-mip and wrong-blend controls still failed. That adds an RDNA 4 comparison for the tighter UHD 770 boundary in the linked report. Please keep that split as an adapter observation. The open comparison is a source-built case that reproduces one of the original finite differences between the translated and direct paths.
RavenCurseBurg commented 2026-11-26 01:02:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T01:00:15Z.


I’ll compare the public Grad|MinLod form with direct HLSL SampleGrad on the UHD 770, RTX 4060 and WARP. I’ll keep the four colored mips, UV, linear mip filter and clamp fixed, and vary the explicit gradient across the point where it overtakes the clamp. The existing Grad smoke uses one small gradient. I’ll start with exact power-of-two gradients, include a wrong-gradient control, and report the measured range or first same-adapter difference.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179328387 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7179328387). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-26T01:00:15Z. --- I’ll compare the public `Grad|MinLod` form with direct HLSL `SampleGrad` on the UHD 770, RTX 4060 and WARP. I’ll keep the four colored mips, UV, linear mip filter and clamp fixed, and vary the explicit gradient across the point where it overtakes the clamp. The existing Grad smoke uses one small gradient. I’ll start with exact power-of-two gradients, include a wrong-gradient control, and report the measured range or first same-adapter difference.
RavenCurseBurg commented 2026-11-26 02:05:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-26T01:10:07Z.


I found no same-adapter difference for the public explicit-gradient form over this range. I compared SPIR-V OpImageSampleExplicitLod … Grad|MinLod dx dy clamp with direct HLSL SampleGrad(s, uv, dx, dy, int2(0,0), clamp). The four solid-color mips, UV (0.25, 0.25) and mip-linear sampler stayed fixed. The only gradient component varied was the common scale g, with dx=(g,0) and dy=(0,g).

  • At clamp 1, g=0.125, 0.25, 0.5 covered three exact power-of-two footprints.
  • At clamp 1.5, g=0.125, 0.25, 0.34375, 0.3515625, 0.353515625, 0.353553390593, 0.35546875, 0.359375, 0.375, 0.4375, 0.5 covered both sides of the crossing. Each gradient was rounded to float32 before assembly and HLSL compilation.

The independent reference interpolated the four known mip colors at max(clamp, log2(8*g)), with the existing 2/256 absolute per-channel tolerance. All 84 draws wrote color and passed. There were no clear-only draws, skips or timeouts. I also captured the 64×4 raw float words per frame and compared the two paths on the same adapter. All 42 pairs were bit-identical (10,752 channel comparisons).

Adapter and driver Largest absolute difference from ideal blend Gradient at that point
UHD Graphics 770, 32.0.101.5973 0.00123882 0.4375
RTX 4060, 32.0.15.9579 0.00377458 0.359375
WARP, 10.0.26100.9711 0.00123882 0.4375

For example at clamp 1.5 / gradient 0.375, the first green/blue words on WARP and Intel were 3ed40000 / 3f160000. On the RTX they were 3ed400d4 / 3f15ff96. Each device returned its own pair through both paths. With clamp 1 and gradient 0.5, deliberately expecting mip 1 instead of mip 2 failed all six draws at pixel (0,0), first differing channel G, expected 1 and actual 0.

The runs used Windows 11 build 26100.9711, debug layer unavailable, source at f40691e7, public renderer c601e6e9, SPIRV-Tools 262bdab4 (Vulkan 1.2), patched SPIRV-Cross 57e4efcc (shader model 60) and DXC 1.9.2609 (-T ps_6_0 -E main). For the raw comparison I enabled the existing draw_verified raw-output argument on the same mip-blend draw in a local build. Its first pixel matched the public renderer on every draw.

This exercise also found a gap in the Grad smoke test: discarding the explicit gradients still passed all four existing cases. PR #2663 supplies a case where the gradients select mip 1 above a floor of 0. With gradients dropped, red replaces green at pixel (0,0) on all three devices. The original twelve cases with finite differences remain unresolved.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179501325 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7179501325). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-26T01:10:07Z. --- I found no same-adapter difference for the public **explicit-gradient** form over this range. I compared SPIR-V `OpImageSampleExplicitLod … Grad|MinLod dx dy clamp` with direct HLSL `SampleGrad(s, uv, dx, dy, int2(0,0), clamp)`. The four solid-color mips, UV (0.25, 0.25) and mip-linear sampler stayed fixed. The only gradient component varied was the common scale `g`, with `dx=(g,0)` and `dy=(0,g)`. - At clamp 1, `g=0.125, 0.25, 0.5` covered three exact power-of-two footprints. - At clamp 1.5, `g=0.125, 0.25, 0.34375, 0.3515625, 0.353515625, 0.353553390593, 0.35546875, 0.359375, 0.375, 0.4375, 0.5` covered both sides of the crossing. Each gradient was rounded to float32 before assembly and HLSL compilation. The independent reference interpolated the four known mip colors at `max(clamp, log2(8*g))`, with the existing 2/256 absolute per-channel tolerance. All 84 draws wrote color and passed. There were no clear-only draws, skips or timeouts. I also captured the 64×4 raw float words per frame and compared the two paths on the same adapter. All 42 pairs were bit-identical (10,752 channel comparisons). | Adapter and driver | Largest absolute difference from ideal blend | Gradient at that point | | --- | ---: | ---: | | UHD Graphics 770, 32.0.101.5973 | 0.00123882 | 0.4375 | | RTX 4060, 32.0.15.9579 | 0.00377458 | 0.359375 | | WARP, 10.0.26100.9711 | 0.00123882 | 0.4375 | For example at clamp 1.5 / gradient 0.375, the first green/blue words on WARP and Intel were `3ed40000 / 3f160000`. On the RTX they were `3ed400d4 / 3f15ff96`. Each device returned its own pair through both paths. With clamp 1 and gradient 0.5, deliberately expecting mip 1 instead of mip 2 failed all six draws at pixel (0,0), first differing channel G, expected 1 and actual 0. The runs used Windows 11 build 26100.9711, debug layer unavailable, source at `f40691e7`, public renderer `c601e6e9`, SPIRV-Tools `262bdab4` (Vulkan 1.2), patched SPIRV-Cross `57e4efcc` (shader model 60) and DXC 1.9.2609 (`-T ps_6_0 -E main`). For the raw comparison I enabled the existing `draw_verified` raw-output argument on the same mip-blend draw in a local build. Its first pixel matched the public renderer on every draw. This exercise also found a gap in the Grad smoke test: discarding the explicit gradients still passed all four existing cases. [PR #2663](https://github.com/R0Y00/Xbox2Windows/pull/2663) supplies a case where the gradients select mip 1 above a floor of 0. With gradients dropped, red replaces green at pixel (0,0) on all three devices. The original twelve cases with finite differences remain unresolved.
R0Y00 commented 2026-11-26 02:05:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T01:27:35Z.


The gradient-above-floor case is now on main in #2663 (31bcd9ad). On the reviewed head, WARP and RTX 4060 Laptop both matched all 64 pixels. Replacing the new sample with an implicit sample at the same floor produced red instead of green at (0,0) in my WARP control. The contributor’s 42 bit-identical same-adapter pairs cover the tested explicit-gradient range. This issue stays open for a source-built case that reproduces the original translated/direct difference.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179793022 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7179793022). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T01:27:35Z. --- The gradient-above-floor case is now on main in #2663 (`31bcd9ad`). On the reviewed head, WARP and RTX 4060 Laptop both matched all 64 pixels. Replacing the new sample with an implicit sample at the same floor produced red instead of green at (0,0) in my WARP control. The contributor’s 42 bit-identical same-adapter pairs cover the tested explicit-gradient range. This issue stays open for a source-built case that reproduces the original translated/direct difference.
Alexofbulgaria commented 2026-11-27 01:53:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Alexofbulgaria on 2026-11-27T01:53:39Z.


Intel Arc A770 MinLod comparison

Windows 26300.10075, Release at d3e3ea776e4fb32401f1eed3dc109fb477d9cbd8, DXC 1.9.2602.17, pinned SPIR-V tools and MinLod-patched SPIRV-Cross. A770 8086:56a0 / 32.0.101.9175 and WARP 10.0.26100.10068. The debug layer was enabled and reported zero errors and warnings throughout.

I repeated the four registered MinLod cases three times per backend (^spirv_minlod(_exact|_levels|_fractional)?_<backend>$). A770 12/12 passed; WARP 12/12 passed; no CTest skips.

For clamps 1.5, 1.5625 and 1.99609375, both the translated shader and direct HLSL selected mip 1 on the A770 and mip 2 on WARP in all three repeats. Both mips are accepted by the pinned fixture for these clamps. These runs show a backend-dependent mip choice with agreement between both shader paths on each backend. This pin predates the later explicit-gradient addition. Source-built fixtures only. AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7207661366 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7207661366). Originally posted by [Alexofbulgaria](https://github.com/Alexofbulgaria) on 2026-11-27T01:53:39Z. --- ### Intel Arc A770 MinLod comparison Windows `26300.10075`, Release at `d3e3ea776e4fb32401f1eed3dc109fb477d9cbd8`, DXC `1.9.2602.17`, pinned SPIR-V tools and MinLod-patched SPIRV-Cross. A770 `8086:56a0` / `32.0.101.9175` and WARP `10.0.26100.10068`. The debug layer was enabled and reported zero errors and warnings throughout. I repeated the four registered MinLod cases three times per backend (`^spirv_minlod(_exact|_levels|_fractional)?_<backend>$`). **A770 12/12 passed; WARP 12/12 passed; no CTest skips.** For clamps `1.5`, `1.5625` and `1.99609375`, both the translated shader and direct HLSL selected mip 1 on the A770 and mip 2 on WARP in all three repeats. Both mips are accepted by the pinned fixture for these clamps. These runs show a backend-dependent mip choice with agreement between both shader paths on each backend. This pin predates the later explicit-gradient addition. Source-built fixtures only. AI-assisted.
xiaoqi72665 commented 2026-11-27 03:23:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by xiaoqi72665 on 2026-11-27T03:23:07Z.


RX 7900 XT / WARP MinLod comparison

Source-built public fixtures at a4fae199517158fd443bfdd450f476b2c7b5f4c1, clean main, Debug (dev preset), Windows 10 build 19045.6466, Windows SDK 10.0.26100.0 DXC 1.8.2502.11. RX 7900 XT (1002:744c), driver 32.0.32029.2010; in-box WARP 10.0.19041.5794. D3D12 debug layer unavailable. SPIRV-Tools 262bdab4 / Headers b824a462, SPIRV-Cross 57e4efc with the repository MinLod patch.

Results: three registered MinLod cases passed on each adapter, with one capability skip per adapter.

Test RX 7900 XT WARP
spirv_minlod PASS PASS
spirv_minlod_exact PASS PASS
spirv_minlod_levels PASS PASS
spirv_minlod_fractional SKIP SKIP

The implicit, bias, explicit-gradient, and gradient-above-clamp positive cases each matched all 64 pixels (256 channels) exactly. The no-clamp control detected a mismatch. Exact and multi-level fixtures also passed, including direct HLSL controls and deliberately wrong mip/blend expectations. The fractional point-filter fixture requires ps_6_6; both adapters reported that SM 6.6 is unavailable in this Windows 10 environment. The initial strict run with X2W_REQUIRE_SPIRV_TOOLS=1 converted these capability skips into failures. Rerunning only those two tests with that variable unset confirmed exit 77 / CTest SKIPPED. This is not a successful fractional-point-filter measurement.

$env:XBOX2WINDOWS_ADAPTER = 'RX 7900 XT'
ctest --preset dev --no-tests=error -j 1 -R '^spirv_minlod(_exact|_levels|_fractional)?_(hardware|warp)$' -V

No reproduction of the original translated/direct finite difference in the supported stock fixture range. The fractional point-filter question remains open on this machine. No game inputs.

Buhe (@xiaoqi72665). AI-assisted; tests executed on local hardware.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7208943408 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/809#issuecomment-7208943408). Originally posted by [xiaoqi72665](https://github.com/xiaoqi72665) on 2026-11-27T03:23:07Z. --- ### RX 7900 XT / WARP MinLod comparison Source-built public fixtures at `a4fae199517158fd443bfdd450f476b2c7b5f4c1`, clean `main`, Debug (`dev` preset), Windows 10 build 19045.6466, Windows SDK 10.0.26100.0 DXC 1.8.2502.11. RX 7900 XT (1002:744c), driver 32.0.32029.2010; in-box WARP 10.0.19041.5794. D3D12 debug layer unavailable. SPIRV-Tools `262bdab4` / Headers `b824a462`, SPIRV-Cross `57e4efc` with the repository MinLod patch. Results: three registered MinLod cases passed on each adapter, with one capability skip per adapter. | Test | RX 7900 XT | WARP | |---|---|---| | spirv_minlod | PASS | PASS | | spirv_minlod_exact | PASS | PASS | | spirv_minlod_levels | PASS | PASS | | spirv_minlod_fractional | SKIP | SKIP | The implicit, bias, explicit-gradient, and gradient-above-clamp positive cases each matched all 64 pixels (256 channels) exactly. The no-clamp control detected a mismatch. Exact and multi-level fixtures also passed, including direct HLSL controls and deliberately wrong mip/blend expectations. The fractional point-filter fixture requires ps_6_6; both adapters reported that SM 6.6 is unavailable in this Windows 10 environment. The initial strict run with X2W_REQUIRE_SPIRV_TOOLS=1 converted these capability skips into failures. Rerunning only those two tests with that variable unset confirmed exit 77 / CTest SKIPPED. This is not a successful fractional-point-filter measurement. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'RX 7900 XT' ctest --preset dev --no-tests=error -j 1 -R '^spirv_minlod(_exact|_levels|_fractional)?_(hardware|warp)$' -V ``` No reproduction of the original translated/direct finite difference in the supported stock fixture range. The fractional point-filter question remains open on this machine. No game inputs. Buhe (@xiaoqi72665). AI-assisted; tests executed on local hardware.
Sign in to join this conversation.
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#803
No description provided.