tests: Test sign rules for float modulus.

This commit is contained in:
Giovanni Mascellani 2022-10-14 15:35:39 +02:00 committed by Alexandre Julliard
parent d1da5436f4
commit b6a6a927a7
Notes: Alexandre Julliard 2022-10-19 22:07:30 +02: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/32

View File

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