From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- Makefile.am | 2 + tests/fx-technique-fx_2.shader_test | 105 ++++++++++++++++++++++++++++ tests/fx-technique-fx_4.shader_test | 83 ++++++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 tests/fx-technique-fx_2.shader_test create mode 100644 tests/fx-technique-fx_4.shader_test
diff --git a/Makefile.am b/Makefile.am index 29692432..0b73fee9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -66,6 +66,8 @@ vkd3d_shader_tests = \ tests/floor.shader_test \ tests/frac.shader_test \ tests/function-return.shader_test \ + tests/fx-technique-fx_2.shader_test \ + tests/fx-technique-fx_4.shader_test \ tests/hlsl-array-dimension.shader_test \ tests/hlsl-attributes.shader_test \ tests/hlsl-bool-cast.shader_test \ diff --git a/tests/fx-technique-fx_2.shader_test b/tests/fx-technique-fx_2.shader_test new file mode 100644 index 00000000..acc81e27 --- /dev/null +++ b/tests/fx-technique-fx_2.shader_test @@ -0,0 +1,105 @@ +[require] +shader model == 2.0 + + +[pixel shader fail todo] +float4 main() : SV_TARGET +{ + float4 teChnique = {0, 0, 0, 0}; + return teChnique; +} + +[pixel shader fail] +float4 main() : sv_target +{ + float4 technique10 = {0, 0, 0, 0}; + return technique10; +} + +[pixel shader fail todo] +float4 main() : sv_target +{ + float4 technique11 = {0, 0, 0, 0}; + return technique11; +} + +[pixel shader fail] +typedef float4 technique10; + +float4 main() : sv_target +{ + return float4(0, 0, 0, 0); +} + +[pixel shader fail todo] +typedef float4 Technique; + +float4 main() : sv_target +{ + return float4(0, 0, 0, 0); +} + +[pixel shader] +typedef float4 Technique10; +typedef float4 Technique11; + +float4 main() : sv_target +{ + return float4(0, 0, 0, 0); +} + +[pixel shader] +float4 main() : sv_target +{ + float4 teChnique10 = {0, 0, 0, 0}; + float4 teChnique11 = {0, 0, 0, 0}; + return teChnique10 + teChnique11; +} + +[pixel shader] +float4 main() : sv_target +{ + float4 teChnique11 = {0, 0, 0, 0}; + return teChnique11; +} + +[effect todo] +technique +{ +} + +technique10 +{ +} + +% Effects without techniques are not allowed for fx_2_0 +[effect fail] +float4 f; + +% fx_5_0 keyword fails with fx_2_0 profile +[effect fail] +technique +{ +} + +technique11 +{ +} + +[effect fail] +technique +{ +} + +tEchnique10 +{ +} + +[effect fail] +technique +{ +} + +tEchnique11 +{ +} diff --git a/tests/fx-technique-fx_4.shader_test b/tests/fx-technique-fx_4.shader_test new file mode 100644 index 00000000..299798e0 --- /dev/null +++ b/tests/fx-technique-fx_4.shader_test @@ -0,0 +1,83 @@ +[require] +shader model == 4.0 + + +[pixel shader fail todo] +float4 main() : SV_TARGET +{ + float4 teChnique = {0, 0, 0, 0}; + return teChnique; +} + +[pixel shader] +float4 main() : SV_TARGET +{ + float4 teChnique10 = {0, 0, 0, 0}; + return teChnique10; +} + +[pixel shader] +float4 main() : SV_TARGET +{ + float4 teChnique11 = {0, 0, 0, 0}; + return teChnique11; +} + +[effect todo] +technique +{ +} + +technique10 +{ +} + +% Effects without techniques are not allowed for fx_4_0+ +[effect todo] +float4 f; + +% fx_2_0 keyword is allowed with fx_4_0+ profiles +[effect todo] +technique +{ +} + +technique11 +{ +} + +[effect fail] +technique +{ +} + +tEchnique10 +{ +} + +[effect fail] +technique +{ +} + +tEchnique11 +{ +} + +[effect fail] +float4 technique; + +[effect fail] +float4 technIque; + +[effect fail] +float4 technique10; + +[effect fail] +float4 technique11; + +[effect todo] +float4 technIque10; + +[effect todo] +float4 technIque11;