Module: vkd3d Branch: master Commit: ec00782eaee51e6c84a704aa32c10e17654a9d82 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/ec00782eaee51e6c84a704aa32c10e...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Jan 26 13:51:57 2023 +0300
vkd3d-shader/tests: Add some exp()/exp2() tests.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
Makefile.am | 1 + tests/exp.shader_test | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+)
diff --git a/Makefile.am b/Makefile.am index 0b4c2a55..a2625a5c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,6 +59,7 @@ vkd3d_shader_tests = \ tests/cbuffer.shader_test \ tests/compute.shader_test \ tests/conditional.shader_test \ + tests/exp.shader_test \ tests/floor.shader_test \ tests/frac.shader_test \ tests/hlsl-array-dimension.shader_test \ diff --git a/tests/exp.shader_test b/tests/exp.shader_test new file mode 100644 index 00000000..de3be685 --- /dev/null +++ b/tests/exp.shader_test @@ -0,0 +1,25 @@ +[pixel shader] +uniform float4 f; + +float4 main() : sv_target +{ + return exp2(f); +} + +[test] +uniform 0 float4 -1.0 0.0 1.0 2.0 +draw quad +probe all rgba (0.5, 1.0, 2.0, 4.0) 1 + +[pixel shader] +uniform float4 f; + +float4 main() : sv_target +{ + return exp(f); +} + +[test] +uniform 0 float4 -1.0 0.0 1.0 2.0 +draw quad +probe all rgba (0.36787948, 1.0, 2.7182815, 7.38905573) 2