Giovanni Mascellani : tests: Test sign rules for float modulus.
Module: vkd3d Branch: master Commit: b6a6a927a73c63a8cfa5362eb60753d9e66a462d URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/b6a6a927a73c63a8cfa5362eb60753... Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Oct 14 15:35:39 2022 +0200 tests: Test sign rules for float modulus. --- tests/arithmetic-float.shader_test | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/arithmetic-float.shader_test b/tests/arithmetic-float.shader_test index 36838d95..558d5d10 100644 --- a/tests/arithmetic-float.shader_test +++ b/tests/arithmetic-float.shader_test @@ -24,6 +24,32 @@ float4 main() : SV_TARGET draw quad probe all rgba (5.0, 5.0, -5.0, 3.0) +[pixel shader] +float4 main() : SV_TARGET +{ + float x = 42; + float y = 5; + + return float4(x % y, -x % y, x % -y, -x % -y); +} + +[test] +draw quad +probe all rgba (2.0, -2.0, 2.0, -2.0) 16 + +[pixel shader] +float4 main() : SV_TARGET +{ + float x = 45; + float y = 5; + + return float4(x % y, -x % y, x % -y, -x % -y); +} + +[test] +draw quad +probe all rgba (0.0, 0.0, 0.0, 0.0) + [require] % Infinities are not allowed in SM1 shader model >= 4.0
participants (1)
-
Alexandre Julliard