Module: vkd3d Branch: master Commit: 6b6ff48ece4320103f78ef4e6be5eb98b32bbafe URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=6b6ff48ece4320103f78ef4e... Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Wed Apr 27 10:56:21 2022 +0200 vkd3d-shader/hlsl: Test the INT_MIN / -1 constant folding special case. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tests/arithmetic-int.shader_test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/arithmetic-int.shader_test b/tests/arithmetic-int.shader_test index c2eee2ba..8b6d6d7c 100644 --- a/tests/arithmetic-int.shader_test +++ b/tests/arithmetic-int.shader_test @@ -41,3 +41,19 @@ float4 main() : SV_TARGET return x % y; } + +[require] +shader model >= 4.0 + +[pixel shader] +float4 main() : SV_TARGET +{ + int x = -2147483648; + int y = -1; + + return x / y; +} + +[test] +draw quad +probe all rgba (-2147483648.0, -2147483648.0, -2147483648.0, -2147483648.0)