shader: distinguish MinLod translation from adapter rounding #1310
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1317"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Evan-Lowry on 2026-11-24T07:48:11Z.
The fractional MinLod fixture can fail when both the translated shader and the direct HLSL reference read mip 1 at a clamp of 1.5625, as reported in #809. Compare exact readbacks on the same adapter and require both shaders to choose the same accepted mip. Check mip 0 as the negative reference and retain opt-in
--strict-roundingfor checking nearest-mip behavior away from the tie.Verified exact, fractional, and strict fractional checks on an AMD adapter and WARP. A synthetic control that selected the lower mip in both shaders passed in normal mode and failed in strict mode. Changing only the translated shader still failed with the expected disagreement.
python -B tests/docs_links_check.pypassed.Refs #809. AI-assisted with Codex.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T07:55:58Z.
Review: COMMENTED
Peer review at commit
d6b54dfc90a705deacfbd9ce79eaf94ff48e748e:Checks
git diff --check origin/main...HEAD: passedtests/docs_links_check.py: passed (16 Markdown files, 289 links)tests/bidi_controls_check.py: passed (1086 tracked files)--preset dev):cmake --build --preset dev --target offscreen_check -- -j 6(3.61s),ctest --preset dev -R '^(spirv_minlod_fractional_warp|spirv_minlod_levels_warp)$' --parallel 4 --no-tests=error --output-on-failure: 2/2 passed (spirv_minlod_fractional_warp0.97s,spirv_minlod_levels_warp2.52s)/O2(--preset release):cmake --build --preset release --target offscreen_check -- -j 6(0.97s),ctest --preset release -R '^(spirv_minlod_fractional_warp|spirv_minlod_levels_warp)$' --parallel 4 --no-tests=error --output-on-failure: 2/2 passed (spirv_minlod_fractional_warp0.94s,spirv_minlod_levels_warp2.42s)Review Notes
tests/spirv_window/minlod_levels.py,tests/spirv_window/minlod_fractional.py,docs/experiments.md:point_mipcleanly separates adapter rounding behavior (mip 1 vs mip 2 at1.5and1.5625) from translation fidelity by requiring exact readback and translated-vs-HLSL-control agreement on the same adapter, while retaining--strict-roundingfor nearest-mip testing away from the1.5tie.WRONG_FRACTIONAL = ("1.5625", 0)is a valid negative control under both rounding rules.