diff --git a/Makefile.am b/Makefile.am index ca47abb1..f62357cf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -137,6 +137,7 @@ vkd3d_shader_tests = \ tests/hlsl/function.shader_test \ tests/hlsl/fwidth.shader_test \ tests/hlsl/fxgroup-syntax.shader_test \ + tests/hlsl/gather-cmp.shader_test \ tests/hlsl/gather-offset.shader_test \ tests/hlsl/gather.shader_test \ tests/hlsl/geometry.shader_test \ diff --git a/tests/hlsl/gather-cmp.shader_test b/tests/hlsl/gather-cmp.shader_test new file mode 100644 index 00000000..842e6ee5 --- /dev/null +++ b/tests/hlsl/gather-cmp.shader_test @@ -0,0 +1,105 @@ +[require] +shader model >= 5.0 + +[sampler 0] +filter linear linear linear +address clamp clamp clamp +comparison equal + +[srv 0] +format r32-float-shadow +size (2d, 3, 3) +0.0 0.0 0.0 +0.4 0.1 0.0 +0.5 0.0 0.2 + +[pixel shader todo] +SamplerComparisonState s; +Texture2D t; + +float4 main() : sv_target +{ + return t.GatherCmp(s, float2(0.2, 0.2), 0.1, int2(0, 0)); +} + +[test] +todo(sm<6) draw quad +probe (0, 0) rgba(0.0, 1.0, 0.0, 0.0) + +[pixel shader todo] +SamplerComparisonState s; +Texture2D t; + +float4 main() : sv_target +{ + return t.GatherCmpRed(s, float2(0.6, 0.6), 0.1, int2(0, 0)); +} + +[test] +todo(sm<6) draw quad +probe (0, 0) rgba(0.0, 0.0, 0.0, 1.0) + +[pixel shader todo] +SamplerComparisonState s; +Texture2D t; + +float4 main() : sv_target +{ + return t.GatherCmpGreen(s, float2(0.2, 0.2), 0.1, int2(0, 0)); +} + +[test] +todo(sm<6) draw quad +probe (0, 0) rgba(0.0, 1.0, 0.0, 0.0) + +[pixel shader todo] +SamplerComparisonState s; +Texture2D t; + +float4 main() : sv_target +{ + return t.GatherCmpGreen(s, float2(0.8, 0.8), 0.2, int2(0, 0)); +} + +[test] +todo(sm<6) draw quad +probe (0, 0) rgba(0.0, 1.0, 0.0, 0.0) + +[pixel shader todo] +SamplerComparisonState s; +Texture2D t; + +float4 main() : sv_target +{ + return t.GatherCmpGreen(s, float2(0.2, 0.2), 0.1, int2(0, 0), int2(0, 0), int2(0, 0), int2(0, 0)); +} + +[test] +todo(sm<6) draw quad +probe (0, 0) rgba(0.0, 1.0, 0.0, 0.0) + +[pixel shader todo] +SamplerComparisonState s; +Texture2D t; + +float4 main() : sv_target +{ + return t.GatherCmpBlue(s, float2(0.2, 0.8), 0.5, int2(0, 0)); +} + +[test] +todo(sm<6) draw quad +probe (0, 0) rgba(1.0, 0.0, 0.0, 0.0) + +[pixel shader todo] +SamplerComparisonState s; +Texture2D t; + +float4 main() : sv_target +{ + return t.GatherCmpAlpha(s, float2(0.2, 0.8), 0.4, int2(0, 0)); +} + +[test] +todo(sm<6) draw quad +probe (0, 0) rgba(0.0, 0.0, 0.0, 1.0)