shader: lower v_min_f64 and v_max_f64 in the direct compute path #3530
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3530"
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 legacy-code-archaeologist on 2026-11-29T23:34:11Z.
Summary
Lowers
v_min_f64andv_max_f64in the direct C++ compute path. They were refused withdirect DXIL lowering for <name>(VOP3 probe, see #3518). The lowering uses 32-bit integer operations only (no double, no 64-bit integer shader ops), so it does not depend on the approach #3518 settles for binary64 arithmetic.tests/shader_signed_zero_minmax_check.py(reference_word): the number wins over a NaN, and -0 orders below +0.Refs #3518, refs #2935. Independent of #3529 (
v_ldexp_f64);git merge-treeagainst it andmainis clean.Tests
tests/native_minmax_f64_check.py(ir,controls,hardware),tests/cmake/native_minmax_f64.cmake,docs/experiments/native-direct-minmax-f64.md. The VOP3 words were assembled with LLVM 15.0.7.On
main2ff74a6aplus this change, Windows 10.0.26100:ctest --preset dev --no-tests=error -R '^native_minmax_f64_' -V:irpassed: 161 cases, 966 words bit for bit through the IR interpreter ofnative_f16_alu_check.py, NaN included. The cases are 5 readback cases, 6 edge cases and a seeded sweep of 150, many with equal high words.controlspassed: no double, no i64 and no float compare in the module; 4 refusals; zero-equal, NaN-preferring and high-word-only references each differ.hardwareskipped (77). This machine's only D3D12 FL 12_0 adapter does not report SM 6.6 with wave32, so the readback is unmeasured.native_compute_ir_dump, each rebuilt and then restored: comparing only the high words, letting a NaN win, or comparing the keys signed each failsir.ctest --preset dev --no-tests=error -R '^native_.*_(controls|ir)$' -j 2: 139/139 passed.Not established: whether gfx1013 returns a signalling NaN operand quieted instead of the number. The f32 reference ignores any NaN, and so does this lowering.
AI-assisted: written with Claude Code. I reviewed it and ran the commands above.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by Alexofbulgaria on 2026-11-30T04:13:29Z.
Intel Arc A770 readback passed for
v_min_f64andv_max_f64Tested on my Intel Arc A770 (
8086:56a0), driver32.0.101.9175, Windows build26300.10075. Release build with MSVC14.44.35207and DXC1.9.2602.17. I used the repository's synthetic fixtures. Source commit7cc9994ad150af7133bf3204a15d90b6f111fb0a.I ran
ctest --test-dir <release-build> --no-tests=error -R '^native_minmax_f64_(ir|controls|hardware)$' -V. All three tests passed with zero skips.WARP: The same fixture and reference, run with
--direct-warp, skipped with exit 77 at the Shader Model 6.6 and wave32 capability check. WARP arithmetic remains unverified.AI assisted with setup and reporting. The test runs executed locally.