From 6b6ff48ece4320103f78ef4e6be5eb98b32bbafe Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Wed, 27 Apr 2022 10:56:21 +0200 Subject: [PATCH] vkd3d-shader/hlsl: Test the INT_MIN / -1 constant folding special case. Signed-off-by: Giovanni Mascellani Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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)