On Fri Sep 1 16:59:51 2023 +0000, Zebediah Figura wrote:
Though it turns out that it's just better to avoid it: on WARP I get this:
shader_runner:648: Section [test], line 70: Test failed: Got
{0.00000000e+000, 1.00000000e+003, 1.11848115e+009, -1.00000000e+003}, expected {0.00000000e+000, 1.00000000e+003, 1.#INF0000e+000, -1.00000000e+003} at (0, 0).
Is that sm1 or sm4? I'd expect sm1 to be a bit looser, but sm4 has more specified floating point rules and may be more consistent.
That's the complete output: ``` shader_runner:1260: Running tests from a Windows cross build shader_runner:1262: Compiling shaders with d3dcompiler_47.dll and executing with d3d9.dll shader_runner:95: Driver string: d3d10warp.dll. shader_runner:96: Device: Microsoft Basic Render Driver, 1414:008c. shader_runner:99: Using WARP device. shader_runner:648: Section [test], line 70: Test failed: Got {0.00000000e+000, 1.00000000e+003, 1.11848115e+009, -1.00000000e+003}, expected {0.00000000e+000, 1.00000000e+003, 1.#INF0000e+000, -1.00000000e+003} at (0, 0). shader_runner:1265: Compiling shaders with d3dcompiler_47.dll and executing with d3d11.dll shader_runner:164: Adapter: Microsoft Basic Render Driver, 1414:008c. shader_runner:168: Using WARP device. shader_runner:648: Section [test], line 70: Test failed: Got {0.00000000e+000, 1.00000000e+003, -2.28773335e+010, -1.00000000e+003}, expected {0.00000000e+000, 1.00000000e+003, 1.#INF0000e+000, -1.00000000e+003} at (0, 0). shader_runner:1268: Compiling shaders with d3dcompiler_47.dll and executing with d3d12.dll shader_runner:340: Adapter: Microsoft Basic Render Driver, 1414:008c. shader_runner:344: Using WARP device. shader_runner:648: Section [test], line 70: Test failed: Got {0.00000000e+000, 1.00000000e+003, -2.28773335e+010, -1.00000000e+003}, expected {0.00000000e+000, 1.00000000e+003, 1.#INF0000e+000, -1.00000000e+003} at (0, 0). shader_runner:1238: d3dcompiler_47.dll version: 10.0.22621.4 shader_runner:1238: dxgi.dll version: 10.0.22621.317 shader_runner:1238: d3d9.dll version: 10.0.22621.317 shader_runner:1238: d3d11.dll version: 10.0.22621.317 shader_runner:1238: d3d12.dll version: 10.0.22621.317 shader_runner: 538 tests executed (3 failures, 0 skipped, 0 todo, 0 bugs). ```
So SM1 has a result and SM4 has another. I'm not sure of what exactly is mandated by IEEE, and whether SM4 is really expected to fully comply with IEEE. Notice that we're not really evaluating on pi/2, because that's not representable as a floating point number. So giving a finite, however large, doesn't look wrong.