Module: vkd3d Branch: master Commit: cab1f57e01e9bb84d7a4f0d0cffdfd9125f68d07 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/cab1f57e01e9bb84d7a4f0d0cffdfd...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Jul 26 14:08:21 2023 +0200
tests: Add a test for fmod() with vector arguments.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
tests/hlsl/fmod.shader_test | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/tests/hlsl/fmod.shader_test b/tests/hlsl/fmod.shader_test index 4c9ff988..9eb69c3b 100644 --- a/tests/hlsl/fmod.shader_test +++ b/tests/hlsl/fmod.shader_test @@ -11,3 +11,17 @@ probe all rgba (-0.5, 0.0, 0.0, 0.0) 4 uniform 0 float4 1.1 0.3 0.0 0.0 draw quad probe all rgba (0.2, 0.0, 0.0, 0.0) 4 + +[pixel shader] +float4 main(uniform float4 u) : sv_target +{ + return float4(fmod(u.xy, u.z), 0, 0); +} + +[test] +uniform 0 float4 -0.5 6.5 2.0 0.0 +draw quad +probe all rgba (-0.5, 0.5, 0.0, 0.0) 4 +uniform 0 float4 1.1 0.3 3.0 0.0 +draw quad +probe all rgba (1.1, 0.3, 0.0, 0.0) 4