vkd3d-shader/hlsl: sin(), cos(), sqrt() and step() intrinsics.
1 unresolved thread
1 unresolved thread
Merge request reports
Activity
This fails when running under d3d9 under wine:
leslie@terabithia:~/git/vkd3d64$ make -j8 tests/shader_runner.cross64.exe && WINEDLLOVERRIDES=d3dcompiler_47=n VKD3D_TEST_PLATFORM=windows wine tests/shader_runner.cross64.exe ../vkd3d/tests/trigonometry.shader_test 0150:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION shader_runner:98: Driver string: aticfx32.dll. shader_runner:99: Device: Radeon(TM) RX 460 Graphics, 1002:67ef. 0154:fixme:d3d:state_linepattern_w Setting line patterns is not supported in OpenGL core contexts. shader_runner:551:Section [test], line 42: Test failed: Got {6.55651093e-007, 4.99999940e-001, 5.00000417e-001, 8.94069672e-007}, expected {0.00000000e+000, 5.00000000e-001, 5.00000000e-001, -0.00000000e+000} at (0, 0). shader_runner:551:Section [test], line 56: Test failed: Got {1.00000000e+000, 7.07106709e-001, 8.94069672e-007, -7.07075000e-001}, expected {1.00000000e+000, 7.07107008e-001, -0.00000000e+000, -7.07107008e-001} at (0, 0). shader_runner:188: Adapter: Radeon(TM) RX 460 Graphics, 1002:67ef. shader_runner:342: Adapter: Radeon(TM) RX 460 Graphics, 1002:67ef. shader_runner: 492 tests executed (2 failures, 0 skipped, 0 todo, 0 bugs).
From testing, it looks like native will use a polynomial approximation in some cases (specifically: if more than one component is needed and the sincos() intrinsic isn't used).
I see, and the difference between
8.94069672e-007
and plain old0.0
in terms of ulps seems to be impractically high.How about using the
round()
intrinsic, as in the update?Worth noting: The d3d11 functional specification says:
The maximum absolute error is 0.0008 in the interval from -100*Pi to +100*Pi.
Edited by Francisco Casas
added 7 commits
- bf2654e9 - vkd3d-shader/hlsl: Add additional tests for sin() and cos().
- 1e401187 - vkd3d-shader/hlsl: Support sin() intrinsic.
- a11ecb31 - vkd3d-shader/hlsl: Support cos() intrinsic.
- 0e7c2815 - tests: Test sqrt() intrinsic.
- 44ba026f - vkd3d-shader/hlsl: Parse sqrt() intrinsic.
- b5123fb6 - tests: Test step() intrinsic.
- e66a9982 - vkd3d-shader/hlsl: Parse step() intrinsic.
Toggle commit listadded 18 commits
-
e66a9982...2b1ec0cf - 11 commits from branch
wine:master
- b65c4501 - vkd3d-shader/hlsl: Add additional tests for sin() and cos().
- 3239ea5f - vkd3d-shader/hlsl: Support sin() intrinsic.
- 8d5f16d8 - vkd3d-shader/hlsl: Support cos() intrinsic.
- 7dbc879e - tests: Test sqrt() intrinsic.
- 6fbf2b3e - vkd3d-shader/hlsl: Parse sqrt() intrinsic.
- 4e1a4a76 - tests: Test step() intrinsic.
- 13c8e8b8 - vkd3d-shader/hlsl: Parse step() intrinsic.
Toggle commit list-
e66a9982...2b1ec0cf - 11 commits from branch
Please register or sign in to reply