diff --git a/tests/hlsl/arithmetic-float-uniform.shader_test b/tests/hlsl/arithmetic-float-uniform.shader_test index 38e37b3f..506375eb 100644 --- a/tests/hlsl/arithmetic-float-uniform.shader_test +++ b/tests/hlsl/arithmetic-float-uniform.shader_test @@ -91,6 +91,38 @@ uniform 0 float4 1.0 0.0 0.0 0.0 draw quad probe all rgba (1e99, 1e99, 1e99, 1e99) +[pixel shader todo] +uniform float4 a, b, c; + +float4 main() : sv_target +{ + return mad(a, b, c); +} + +[test] +uniform 0 float4 1.00000007 -42.1 4.0 45.0 +uniform 4 float4 1.625 -5.0 4.125 5.0 +uniform 8 float4 1.00000007 -1.0 0.5 -0.5 +todo draw quad +probe all rgba (2.62500024, 209.5, 17.0, 224.5) 1 + +% precise mad() is not allowed to fuse, even though unfused is less precise. +[pixel shader todo] +uniform float4 a, b, c; + +float4 main() : sv_target +{ + precise float4 ret = mad(a, b, c); + return ret; +} + +[test] +uniform 0 float4 1.00000007 -42.1 4.0 45.0 +uniform 4 float4 1.625 -5.0 4.125 5.0 +uniform 8 float4 1.00000007 -1.0 0.5 -0.5 +todo draw quad +todo probe all rgba (2.62500048, 209.5, 17.0, 224.5) + [require] shader model >= 5.0 float64 @@ -140,3 +172,18 @@ float4 main() : SV_TARGET uniform 0 double2 1.5e300 2.0e299 todo(sm<6) draw quad probe all rgba (7.5, 7.5, 7.5, 7.5) + +[pixel shader todo] +uniform double2 a, b, c; + +float4 main() : sv_target +{ + return float4(fma(a, b, c), 0, 0); +} + +[test] +uniform 0 double2 1.00000007 -42.1 +uniform 4 double2 1.625 -5.0 +uniform 8 double2 1.00000007 -1.0 +todo draw quad +probe all rgba (2.62500024, 209.5, 0.0, 0.0)