vkd3d-shader/tests: Add some exp()/exp2() tests.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2023-01-26 13:51:57 +03:00 committed by Alexandre Julliard
parent 8bb023e5af
commit ec00782eae
Notes: Alexandre Julliard 2023-01-26 23:11:43 +01:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/72
2 changed files with 26 additions and 0 deletions

View File

@ -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 \

25
tests/exp.shader_test Normal file
View File

@ -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