From: Conor McCarthy cmccarthy@codeweavers.com
--- Makefile.am | 2 +- .../{max.shader_test => max-min.shader_test} | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) rename tests/hlsl/{max.shader_test => max-min.shader_test} (54%)
diff --git a/Makefile.am b/Makefile.am index 68e8642e0..ced1c8ce1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -144,7 +144,7 @@ vkd3d_shader_tests = \ tests/hlsl/math.shader_test \ tests/hlsl/matrix-indexing.shader_test \ tests/hlsl/matrix-semantics.shader_test \ - tests/hlsl/max.shader_test \ + tests/hlsl/max-min.shader_test \ tests/hlsl/minimum-precision.shader_test \ tests/hlsl/mul.shader_test \ tests/hlsl/multiple-rt.shader_test \ diff --git a/tests/hlsl/max.shader_test b/tests/hlsl/max-min.shader_test similarity index 54% rename from tests/hlsl/max.shader_test rename to tests/hlsl/max-min.shader_test index 67aa69046..7c83e8181 100644 --- a/tests/hlsl/max.shader_test +++ b/tests/hlsl/max-min.shader_test @@ -52,3 +52,48 @@ float4 main() : sv_target max(a, b); return 0; } + + +[pixel shader] +uniform float2 u; + +float4 main() : sv_target +{ + return float4(min(u.x, u.y), min(2, 2.1), min(true, 2), min(-1, -2)); +} + +[test] +uniform 0 float4 0.7 -0.1 0.0 0.0 +todo(glsl) draw quad +probe all rgba (-0.1, 2.0, 1.0, -2.0) + + +[require] +shader model >= 4.0 + +[pixel shader] +uniform uint2 u; + +uint4 main() : sv_target +{ + return uint4(max(u.x, u.y), min(true, u.y), max(1, 2), min(1, 2)); +} + +[test] +uniform 0 uint4 1 2 0 0 +todo(glsl) draw quad +probe all rgbaui (2, 1, 2, 1) + + +[pixel shader todo] +uniform int2 u; + +int4 main() : sv_target +{ + return int4(max(u.x, u.y), min(u.x, u.y), max(-true, -2), min(-1, -2)); +} + +[test] +uniform 0 int4 -1 -2 0 0 +todo(sm<6) draw quad +probe all rgbai (-1, -2, -1, -2)