From: Francisco Casas fcasas@codeweavers.com
At the current moment this is a little odd because for SM1 [test] directives are skipped, and the [shader] directives are not executed by the shader_runner_vulkan.c:compile_shader() but by the general shader_runner.c:compile_shader(). So in principle it is a little weird that we go through the vulkan runner.
But fret not, because in the future we plan to make the parser agnostic to the language of the tests, so we will get rid of the general shader_runner.c:compile_shader() function and instead call a runner->compile_shader() function, defined for each runner. Granted, most of these may call a generic implementation that uses native compiler in Windows, and vkd3d-shader on Linux, but it would be more conceptually correct. --- tests/hlsl/abs.shader_test | 4 +- tests/hlsl/any.shader_test | 24 +++--- .../hlsl/arithmetic-float-uniform.shader_test | 16 ++-- tests/hlsl/arithmetic-int-uniform.shader_test | 32 ++++---- tests/hlsl/arithmetic-int.shader_test | 2 + tests/hlsl/ceil.shader_test | 4 +- tests/hlsl/clip.shader_test | 8 +- tests/hlsl/combined-samplers.shader_test | 4 +- tests/hlsl/conditional.shader_test | 16 ++-- tests/hlsl/ddxddy.shader_test | 16 ++-- tests/hlsl/discard.shader_test | 6 +- tests/hlsl/distance.shader_test | 2 +- tests/hlsl/dot.shader_test | 4 +- tests/hlsl/entry-point-semantics.shader_test | 6 +- tests/hlsl/expr-indexing.shader_test | 14 ++-- tests/hlsl/float-comparison.shader_test | 4 +- tests/hlsl/floor.shader_test | 4 +- tests/hlsl/fmod.shader_test | 12 +-- tests/hlsl/for.shader_test | 8 +- tests/hlsl/function-return.shader_test | 50 ++++++------ tests/hlsl/fwidth.shader_test | 2 +- tests/hlsl/half.shader_test | 4 +- tests/hlsl/hard-copy-prop.shader_test | 19 ++--- .../initializer-implicit-array.shader_test | 2 +- tests/hlsl/length.shader_test | 2 +- tests/hlsl/lit.shader_test | 12 +-- tests/hlsl/loop.shader_test | 28 +++---- tests/hlsl/matrix-indexing.shader_test | 8 +- tests/hlsl/non-const-indexing.shader_test | 52 ++++++------ tests/hlsl/normalize.shader_test | 2 +- tests/hlsl/reflect.shader_test | 4 +- tests/hlsl/return.shader_test | 79 +++++++++---------- tests/hlsl/round.shader_test | 8 +- tests/hlsl/sample-bias.shader_test | 8 +- tests/hlsl/sample-level.shader_test | 12 +-- tests/hlsl/sampler.shader_test | 8 +- tests/hlsl/saturate.shader_test | 4 +- tests/hlsl/sign.shader_test | 22 +++--- tests/hlsl/smoothstep.shader_test | 4 +- tests/hlsl/static-initializer.shader_test | 9 ++- tests/hlsl/step.shader_test | 4 +- tests/hlsl/ternary.shader_test | 10 +-- tests/hlsl/trigonometry.shader_test | 16 ++-- tests/hlsl/trunc.shader_test | 10 +-- .../hlsl/vector-indexing-uniform.shader_test | 4 +- tests/shader_runner.c | 13 ++- tests/shader_runner_vulkan.c | 22 ++++-- 47 files changed, 305 insertions(+), 299 deletions(-)
diff --git a/tests/hlsl/abs.shader_test b/tests/hlsl/abs.shader_test index 738e69312..4d1d1e33e 100644 --- a/tests/hlsl/abs.shader_test +++ b/tests/hlsl/abs.shader_test @@ -8,8 +8,8 @@ float4 main() : sv_target
[test] uniform 0 float4 0.1 0.7 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.1, 0.7, 0.4, 0.4) uniform 0 float4 -0.7 0.1 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.7, 0.1, 1.2, 0.4) diff --git a/tests/hlsl/any.shader_test b/tests/hlsl/any.shader_test index f2298d3a3..afaf81fac 100644 --- a/tests/hlsl/any.shader_test +++ b/tests/hlsl/any.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f;
float4 main() : sv_target @@ -8,28 +8,28 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 1.0 1.0 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 1.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 1.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) uniform 0 float4 -1.0 -1.0 -1.0 -1.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float f;
float4 main() : sv_target @@ -39,13 +39,13 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) uniform 0 float4 -1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[require] diff --git a/tests/hlsl/arithmetic-float-uniform.shader_test b/tests/hlsl/arithmetic-float-uniform.shader_test index 75684cc60..38e37b3fa 100644 --- a/tests/hlsl/arithmetic-float-uniform.shader_test +++ b/tests/hlsl/arithmetic-float-uniform.shader_test @@ -13,7 +13,7 @@ uniform 0 float4 5.0 15.0 0.0 0.0 draw quad probe all rgba (20.0, -10.0, 75.0, 0.33333333) 1
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -25,10 +25,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 15.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 5.0, -5.0, 3.0) 1
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -40,10 +40,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, -2.0, 2.0, -2.0) 16
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -55,10 +55,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 x, y;
float4 main() : sv_target @@ -69,7 +69,7 @@ float4 main() : sv_target [test] uniform 0 float4 5.0 -42.1 4.0 45.0 uniform 4 float4 15.0 -5.0 4.1 5.0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, -2.1, 4.0, 0.0) 6
[require] diff --git a/tests/hlsl/arithmetic-int-uniform.shader_test b/tests/hlsl/arithmetic-int-uniform.shader_test index bb83eb76e..0c5ab37d1 100644 --- a/tests/hlsl/arithmetic-int-uniform.shader_test +++ b/tests/hlsl/arithmetic-int-uniform.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -10,10 +10,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 16.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (21.0, -11.0, 80.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -25,10 +25,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 16.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 5.0, -5.0, 3.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -40,10 +40,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (8.0, -8.0, -8.0, 8.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -55,10 +55,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, -2.0, 2.0, -2.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -70,10 +70,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (9.0, -9.0, -9.0, 9.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 a;
float4 main() : SV_TARGET @@ -85,10 +85,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a;
float4 main() : SV_TARGET @@ -98,10 +98,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 -7.0 0.0 -10.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (5.0, 7.0, 0.0, 10.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a; uniform float4 b;
@@ -117,7 +117,7 @@ float4 main() : sv_target [test] uniform 0 float4 45.0 5.0 50.0 10.0 uniform 4 float4 3.0 8.0 2.0 5.0 -draw quad +todo(sm<4) draw quad probe all rgba (9.0, 5.0, 1.0, 3.0)
[require] diff --git a/tests/hlsl/arithmetic-int.shader_test b/tests/hlsl/arithmetic-int.shader_test index f2044c42c..46b641811 100644 --- a/tests/hlsl/arithmetic-int.shader_test +++ b/tests/hlsl/arithmetic-int.shader_test @@ -77,6 +77,7 @@ draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader fail(sm<6)] +// On SM1 this gives hr 0x88760b59. float4 main() : SV_TARGET { int x = 1; @@ -90,6 +91,7 @@ draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader fail(sm<6)] +// On SM1 this gives hr 0x88760b59. float4 main() : SV_TARGET { int x = 1; diff --git a/tests/hlsl/ceil.shader_test b/tests/hlsl/ceil.shader_test index ef26cc8ef..46414a92b 100644 --- a/tests/hlsl/ceil.shader_test +++ b/tests/hlsl/ceil.shader_test @@ -21,7 +21,7 @@ uniform 0 float4 -0.5 6.5 7.5 3.4 draw quad probe all rgba (0.0, 7.0, 8.0, 4.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -34,7 +34,7 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (7.0, 8.0, 0.0, 4.0) 4
[require] diff --git a/tests/hlsl/clip.shader_test b/tests/hlsl/clip.shader_test index d7473c999..2afd66d58 100644 --- a/tests/hlsl/clip.shader_test +++ b/tests/hlsl/clip.shader_test @@ -10,13 +10,13 @@ float4 main() : sv_target [test] uniform 0 float4 1 2 3 4 todo(sm>=6) draw quad -probe all rgba (1, 2, 3, 4) +todo(sm<4) probe all rgba (1, 2, 3, 4) uniform 0 float4 9 8 7 6 todo(sm>=6) draw quad -probe all rgba (9, 8, 7, 6) +todo(sm<4) probe all rgba (9, 8, 7, 6) uniform 0 float4 -1 8 7 6 todo(sm>=6) draw quad -probe all rgba (9, 8, 7, 6) +todo(sm<4) probe all rgba (9, 8, 7, 6) uniform 0 float4 9 0 7 6 todo(sm>=6) draw quad -probe all rgba (9, 0, 7, 6) +todo(sm<4) probe all rgba (9, 0, 7, 6) diff --git a/tests/hlsl/combined-samplers.shader_test b/tests/hlsl/combined-samplers.shader_test index 235537594..4d743aecf 100644 --- a/tests/hlsl/combined-samplers.shader_test +++ b/tests/hlsl/combined-samplers.shader_test @@ -64,7 +64,7 @@ draw quad probe all rgba (10, 10, 10, 11)
-[pixel shader] +[pixel shader todo(sm<4)] Texture2D tex; sampler sam[2];
@@ -111,7 +111,7 @@ probe all rgba (104, 104, 104, 111)
% Sampler arrays with components that have different usage dimensions are only forbidden in SM4 upwards. % However, tex2D and tex1D are considered the same dimension for these purposes. -[pixel shader fail] +[pixel shader fail(sm>=4)] sampler sam[2];
float4 main() : sv_target diff --git a/tests/hlsl/conditional.shader_test b/tests/hlsl/conditional.shader_test index 0a927a8fa..5b3038c37 100644 --- a/tests/hlsl/conditional.shader_test +++ b/tests/hlsl/conditional.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -11,13 +11,13 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.9, 0.8, 0.7, 0.6) uniform 0 float4 0.1 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -29,7 +29,7 @@ float4 main() : sv_target return float4(0.9, 0.8, 0.7, 0.6); }
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -43,7 +43,7 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.9, 0.8, 0.7, 0.6)
[pixel shader fail(sm<6)] @@ -74,7 +74,7 @@ float main() : sv_target [require] shader model >= 3.0
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -88,7 +88,7 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.9, 0.8, 0.7, 0.6)
[pixel shader] diff --git a/tests/hlsl/ddxddy.shader_test b/tests/hlsl/ddxddy.shader_test index 4986c233f..72925b975 100644 --- a/tests/hlsl/ddxddy.shader_test +++ b/tests/hlsl/ddxddy.shader_test @@ -9,7 +9,7 @@ float4 main(float4 pos : sv_position) : sv_target
[test] draw quad -probe all rgba (1.0, 1.0, 0.0, 0.0) +todo(sm<4) probe all rgba (1.0, 1.0, 0.0, 0.0)
[pixel shader] @@ -30,13 +30,13 @@ float4 main(float4 pos : sv_position) : sv_target
[test] draw quad -probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0) -probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0) -probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0) -probe (11, 11) rgba (-17.0, -5.0, 3.0, 0.0) -probe (12, 10) rgba (-26.0, -6.0, 4.0, 0.0) -probe (16, 16) rgba (-25.0, -7.0, 5.0, 0.0) -probe (150, 150) rgba (-226.0, -47.0, 45.0, 0.0) +todo(sm<4) probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0) +todo(sm<4) probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0) +todo(sm<4) probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0) +todo(sm<4) probe (11, 11) rgba (-17.0, -5.0, 3.0, 0.0) +todo(sm<4) probe (12, 10) rgba (-26.0, -6.0, 4.0, 0.0) +todo(sm<4) probe (16, 16) rgba (-25.0, -7.0, 5.0, 0.0) +todo(sm<4) probe (150, 150) rgba (-226.0, -47.0, 45.0, 0.0)
[require] diff --git a/tests/hlsl/discard.shader_test b/tests/hlsl/discard.shader_test index cecb8c1fd..a5cdde475 100644 --- a/tests/hlsl/discard.shader_test +++ b/tests/hlsl/discard.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 x;
float4 main() : sv_target @@ -9,8 +9,8 @@ float4 main() : sv_target
[test] uniform 0 float4 1 2 3 4 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4) uniform 0 float4 9 8 7 6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4) diff --git a/tests/hlsl/distance.shader_test b/tests/hlsl/distance.shader_test index 3f5446451..bf2423c7a 100644 --- a/tests/hlsl/distance.shader_test +++ b/tests/hlsl/distance.shader_test @@ -13,7 +13,7 @@ uniform 4 float4 2.0 -1.0 4.0 5.0 draw quad probe all rgba (7.483983, 7.483983, 7.483983, 7.483983) 1
-[pixel shader] +[pixel shader todo(sm<4)] uniform int4 x; uniform int4 y;
diff --git a/tests/hlsl/dot.shader_test b/tests/hlsl/dot.shader_test index c620e5fac..c6a96cc1e 100644 --- a/tests/hlsl/dot.shader_test +++ b/tests/hlsl/dot.shader_test @@ -25,7 +25,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 0.0 0.0 uniform 4 float4 10.0 11.0 12.0 13.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (53.0, 53.0, 53.0, 53.0)
[pixel shader] @@ -56,7 +56,7 @@ float4 main() : SV_TARGET uniform 0 float4 10.0 11.0 12.0 13.0 uniform 4 float4 2.0 0.0 0.0 0.0 todo(sm>=6) draw quad -probe all rgba (92.0, 92.0, 92.0, 92.0) + probe all rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] uniform float x; diff --git a/tests/hlsl/entry-point-semantics.shader_test b/tests/hlsl/entry-point-semantics.shader_test index b87dca4d9..403fd66cc 100644 --- a/tests/hlsl/entry-point-semantics.shader_test +++ b/tests/hlsl/entry-point-semantics.shader_test @@ -127,7 +127,7 @@ float4 main(in apple aps[2][2]) : sv_target
[test] draw quad -todo(sm>=6) probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0) +probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0)
[pixel shader] @@ -275,8 +275,8 @@ float4 main(in float4 t1 : TEXCOORD0, in float4 t2 : TEXCOORD0) : sv_target }
[test] -todo(sm>=6) draw quad -probe (0, 0) rgba (99.0, 99.0, 10.0, 11.0) +draw quad +todo(sm>=6) probe (0, 0) rgba (99.0, 99.0, 10.0, 11.0)
% Different indexes of the same semantic can have different types. diff --git a/tests/hlsl/expr-indexing.shader_test b/tests/hlsl/expr-indexing.shader_test index 3dcc5727e..2aa99b40d 100644 --- a/tests/hlsl/expr-indexing.shader_test +++ b/tests/hlsl/expr-indexing.shader_test @@ -13,7 +13,7 @@ draw quad probe all rgba (8.0, 8.0, 8.0, 8.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 a, b; float i;
@@ -26,7 +26,7 @@ float4 main() : sv_target uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
@@ -44,7 +44,7 @@ draw quad probe all rgba (3.0, 3.0, 3.0, 3.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 a; float i;
@@ -56,10 +56,10 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float 0 -draw quad +todo(sm<4) draw quad probe all rgba (4.0, 4.0, 4.0, 4.0) uniform 4 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
@@ -82,7 +82,7 @@ draw quad probe all rgba (4.0, 4.0, 4.0, 4.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 a; float i;
@@ -99,5 +99,5 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float 1 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, 2.0, 2.0, 2.0) diff --git a/tests/hlsl/float-comparison.shader_test b/tests/hlsl/float-comparison.shader_test index ee4b5eb7c..7109f9af0 100644 --- a/tests/hlsl/float-comparison.shader_test +++ b/tests/hlsl/float-comparison.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f;
float4 main() : sv_target @@ -44,7 +44,7 @@ shader model < 4.0
[test] uniform 0 float4 0.0 1.5 1.5 0.0 -draw quad +todo(sm<4) draw quad todo probe all rgba (1010101.0, 11001100.0, 1101001.0, 0.0)
% SM4-5 optimises away the 'not' by inverting the condition, even though this is invalid for NaN. diff --git a/tests/hlsl/floor.shader_test b/tests/hlsl/floor.shader_test index 19f9437a9..89e1f12ef 100644 --- a/tests/hlsl/floor.shader_test +++ b/tests/hlsl/floor.shader_test @@ -21,7 +21,7 @@ uniform 0 float4 -0.5 6.5 7.5 3.4 draw quad probe all rgba (-1.0, 6.0, 7.0, 3.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -34,7 +34,7 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (6.0, 7.0, -1.0, 3.0) 4
[require] diff --git a/tests/hlsl/fmod.shader_test b/tests/hlsl/fmod.shader_test index 05518c7cd..d21301fee 100644 --- a/tests/hlsl/fmod.shader_test +++ b/tests/hlsl/fmod.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -8,13 +8,13 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (-0.5, 0.0, 0.0, 0.0) 4 uniform 0 float4 1.1 0.3 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.2, 0.0, 0.0, 0.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -24,8 +24,8 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 2.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (-0.5, 0.5, 0.0, 0.0) 4 uniform 0 float4 1.1 0.3 3.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1.1, 0.3, 0.0, 0.0) 4 diff --git a/tests/hlsl/for.shader_test b/tests/hlsl/for.shader_test index 9407c81bc..b7fa51eec 100644 --- a/tests/hlsl/for.shader_test +++ b/tests/hlsl/for.shader_test @@ -5,7 +5,7 @@ void main(float4 pos : position, out float tex : texcoord, out float4 out_pos : out_pos = pos; }
-[pixel shader] +[pixel shader todo(sm<4)] float4 main(float tex : texcoord) : sv_target { int i; @@ -23,12 +23,12 @@ float4 main(float tex : texcoord) : sv_target }
[test] -draw quad +todo(sm<4) draw quad probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0) probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0) probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 main(float tex : texcoord) : sv_target { int i; @@ -41,7 +41,7 @@ float4 main(float tex : texcoord) : sv_target }
[test] -draw quad +todo(sm<4) draw quad probe all rgba (10.0, 45.0, 0.0, 0.0)
[pixel shader fail(sm<6)] diff --git a/tests/hlsl/function-return.shader_test b/tests/hlsl/function-return.shader_test index be997d0c3..a316baee3 100644 --- a/tests/hlsl/function-return.shader_test +++ b/tests/hlsl/function-return.shader_test @@ -32,8 +32,7 @@ float4 main() : sv_target draw quad probe all rgba (0.2, 0.1, 0.8, 0.5);
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
float func(out float o) @@ -80,20 +79,19 @@ float4 main() : sv_target
[test] uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.2, 0.6, 0.3) 1 uniform 0 float 0.4 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.6, 0.5, 0.6, 0.3) 1 uniform 0 float 0.6 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.6, 0.5, 0.4, 0.5) 1 uniform 0 float 0.8 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.8, 0.7, 0.4, 0.5) 1
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
float func(out float o) @@ -136,17 +134,16 @@ float4 main() : sv_target
[test] uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.2, 0.1, 0.2, 0.1) 1 uniform 0 float 0.5 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.5, 0.4, 1.0, 0.9) 1 uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1.0, 0.9, 1.0, 0.6) 1
-[pixel shader] - +[pixel shader todo(sm<4)] float func(out float o) { o = 0.1; @@ -184,11 +181,10 @@ float4 main() : sv_target }
[test] -draw quad +todo(sm<4) draw quad probe all rgba (0.4, 0.3, 0.3, 0.9) 1
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
float func(out float o) @@ -239,26 +235,26 @@ float4 main() : sv_target
[test] uniform 0 float 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.2, 0.3, 0.3) 1
uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.3, 0.3, 0.3) 1
uniform 0 float 0.3 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.5, 0.3, 0.3) 1
uniform 0 float 0.7 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.3, 0.9, 0.7, 0.6) 1
uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.4, 0.1, 0.7, 0.6) 1
-[pixel shader] +[pixel shader todo(sm<4)]
uniform float4 f[3];
@@ -295,21 +291,21 @@ float4 main() : sv_target uniform 0 float4 0.3 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.1 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.3, 0.2, 0.6, 0.6) 1
uniform 4 float4 0.35 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.3, 0.3, 0.6, 0.6) 1
uniform 8 float4 0.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.3, 0.5, 0.6, 0.6) 1
uniform 0 float4 1.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.3, 0.5, 0.6, 0.6) 1
uniform 4 float4 2.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad todo(sm>=6) probe all rgba (0.4, 0.1, 0.6, 0.6) 1 diff --git a/tests/hlsl/fwidth.shader_test b/tests/hlsl/fwidth.shader_test index d4c20f4e0..10ed712d2 100644 --- a/tests/hlsl/fwidth.shader_test +++ b/tests/hlsl/fwidth.shader_test @@ -18,7 +18,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe (10, 10) rgba (8.0, 8.0, 8.0, 8.0) probe (11, 10) rgba (8.0, 8.0, 8.0, 8.0) probe (12, 10) rgba (10.0, 10.0, 10.0, 10.0) diff --git a/tests/hlsl/half.shader_test b/tests/hlsl/half.shader_test index fe7074e45..8cf7a756f 100644 --- a/tests/hlsl/half.shader_test +++ b/tests/hlsl/half.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [require] options: backcompat
-[pixel shader] +[pixel shader todo(sm<4)] uniform half h;
float4 main() : sv_target @@ -19,5 +19,5 @@ float4 main() : sv_target
[test] uniform 0 float 10.0 -draw quad +todo(sm<4) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0) diff --git a/tests/hlsl/hard-copy-prop.shader_test b/tests/hlsl/hard-copy-prop.shader_test index 8d20425f1..fa4867488 100644 --- a/tests/hlsl/hard-copy-prop.shader_test +++ b/tests/hlsl/hard-copy-prop.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] float cond;
float4 main() : sv_target @@ -17,14 +17,14 @@ float4 main() : sv_target
[test] uniform 0 float 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, 2.0, 2.0, 2.0) uniform 0 float 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (-2.0, -2.0, -2.0, -2.0)
-[pixel shader] +[pixel shader todo(sm<4)] float cond;
float4 main() : sv_target @@ -43,14 +43,14 @@ float4 main() : sv_target
[test] uniform 0 float 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, 2.0, 2.0, 2.0) uniform 0 float 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (20.0, 20.0, 20.0, 20.0)
-[pixel shader] +[pixel shader todo(sm<4)] float cond;
float4 main() : sv_target @@ -66,10 +66,11 @@ float4 main() : sv_target
return float4(r, 0, 0); } + [test] uniform 0 float 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 4.0, 0.0, 0.0) uniform 0 float 1.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 40.0, 0.0, 0.0) diff --git a/tests/hlsl/initializer-implicit-array.shader_test b/tests/hlsl/initializer-implicit-array.shader_test index fff2b8fdf..25cd15644 100644 --- a/tests/hlsl/initializer-implicit-array.shader_test +++ b/tests/hlsl/initializer-implicit-array.shader_test @@ -26,7 +26,7 @@ float4 main() : sv_target
[test] draw quad -todo(sm>=6) probe all rgba (5.0, 6.0, 7.0, 8.0) +probe all rgba (5.0, 6.0, 7.0, 8.0)
[require] % reset requirements diff --git a/tests/hlsl/length.shader_test b/tests/hlsl/length.shader_test index 44b4e5254..ec48300f6 100644 --- a/tests/hlsl/length.shader_test +++ b/tests/hlsl/length.shader_test @@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1
[pixel shader] diff --git a/tests/hlsl/lit.shader_test b/tests/hlsl/lit.shader_test index fcf37d78b..273d52678 100644 --- a/tests/hlsl/lit.shader_test +++ b/tests/hlsl/lit.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -8,20 +8,20 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.1 10.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 0.0, 0.0, 1.0)
[test] uniform 0 float4 1.2 -0.1 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.2, 0.0, 1.0)
[test] uniform 0 float4 1.2 2.0 3.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.2, 8.0, 1.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -31,7 +31,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.2 2.0 3.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (2.0, 2.4, 16.0, 2.0)
[pixel shader fail] diff --git a/tests/hlsl/loop.shader_test b/tests/hlsl/loop.shader_test index 35a303595..a9431085a 100644 --- a/tests/hlsl/loop.shader_test +++ b/tests/hlsl/loop.shader_test @@ -1,6 +1,6 @@ % TODO: dxcompiler emits no loops for any of these test shaders.
-[pixel shader] +[pixel shader todo(sm<4)] float a;
float4 main() : sv_target @@ -18,11 +18,11 @@ float4 main() : sv_target
[test] uniform 0 float 5.0 -draw quad +todo(sm<4) draw quad probe all rgba (50.0, 50.0, 50.0, 50.0)
-[pixel shader] +[pixel shader todo(sm<4)] float a;
float4 main() : sv_target @@ -41,10 +41,10 @@ float4 main() : sv_target
[test] uniform 0 float 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (20.0, 20.0, 20.0, 20.0)
-[pixel shader] +[pixel shader todo(sm<4)] float a;
float4 main() : sv_target @@ -70,10 +70,10 @@ float4 main() : sv_target
[test] uniform 0 float 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (409.1, 409.1, 409.1, 409.1)
-[pixel shader] +[pixel shader todo(sm<4)] float a;
float4 main() : sv_target @@ -100,11 +100,11 @@ float4 main() : sv_target
[test] uniform 0 float 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (410.1, 410.1, 410.1, 410.1)
% loop attribute by itself -[pixel shader] +[pixel shader todo(sm<4)] float4 main() : sv_target { float ret = 0.0; @@ -118,10 +118,10 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 main() : sv_target { float ret = 0.0; @@ -137,10 +137,10 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 main() : sv_target { float ret = 0.0; @@ -156,7 +156,7 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
% unroll can't be used with fastopt or loop diff --git a/tests/hlsl/matrix-indexing.shader_test b/tests/hlsl/matrix-indexing.shader_test index f44ba63ef..6e2f01b7a 100644 --- a/tests/hlsl/matrix-indexing.shader_test +++ b/tests/hlsl/matrix-indexing.shader_test @@ -108,7 +108,7 @@ draw quad probe all rgba (3.0, 4.0, 50.0, 60.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i;
float4 main() : sv_target @@ -120,11 +120,11 @@ float4 main() : sv_target
[test] uniform 0 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (8, 9, 10, 11)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i;
float4 main() : sv_target @@ -136,5 +136,5 @@ float4 main() : sv_target
[test] uniform 0 float 3 -draw quad +todo(sm<4) draw quad probe all rgba (12, 13, 14, 15) diff --git a/tests/hlsl/non-const-indexing.shader_test b/tests/hlsl/non-const-indexing.shader_test index 82a6e321e..b0452148e 100644 --- a/tests/hlsl/non-const-indexing.shader_test +++ b/tests/hlsl/non-const-indexing.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f[3]; uniform float2 i;
@@ -12,20 +12,20 @@ uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 0 0 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 2.0, 3.0, 4.0) uniform 12 float4 1 0 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 12 float4 0 1 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 12 float4 1 1 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (9.0, 10.0, 11.0, 12.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i;
float4 main() : SV_TARGET @@ -36,20 +36,20 @@ float4 main() : SV_TARGET
[test] uniform 0 float 0 -draw quad +todo(sm<4) draw quad probe all rgba (11.0, 11.0, 11.0, 11.0) uniform 0 float 1 -draw quad +todo(sm<4) draw quad probe all rgba (12.0, 12.0, 12.0, 12.0) uniform 0 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (13.0, 13.0, 13.0, 13.0) uniform 0 float 3 -draw quad +todo(sm<4) draw quad probe all rgba (14.0, 14.0, 14.0, 14.0)
-[pixel shader] +[pixel shader todo(sm<4)] float i;
float4 main() : sv_target @@ -61,11 +61,11 @@ float4 main() : sv_target
[test] uniform 0 float 2.3 -draw quad +todo(sm<4) draw quad probe all rgba (3, 3, 3, 3)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i;
float4 main() : SV_TARGET @@ -77,20 +77,20 @@ float4 main() : SV_TARGET
[test] uniform 0 float 0 -draw quad +todo(sm<4) draw quad probe all rgba (21.0, 1.0, 24.0, 0.0) uniform 0 float 1 -draw quad +todo(sm<4) draw quad probe all rgba (22.0, 0.0, 23.0, 1.0) uniform 0 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (23.0, 1.0, 22.0, 0.0) uniform 0 float 3 -draw quad +todo(sm<4) draw quad probe all rgba (24.0, 0.0, 21.0, 1.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2 i;
float4 main() : sv_target @@ -102,20 +102,20 @@ float4 main() : sv_target
[test] uniform 0 float4 0 0 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 2.0, 3.0, 4.0) uniform 0 float4 1 0 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 0 float4 0 1 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 0 float4 1 1 0 0 -draw quad +todo(sm<4) draw quad probe all rgba (9.0, 10.0, 11.0, 12.0)
-[pixel shader] +[pixel shader todo(sm<4)] float4 a;
float4 main() : sv_target @@ -130,7 +130,7 @@ float4 main() : sv_target
[test] uniform 0 float4 0 0 2.4 0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 120.0, 90.0, 4.0)
@@ -242,8 +242,8 @@ uniform 8 float 3.0 uniform 12 float 4.0 uniform 16 uint4 3 1 0 2 uniform 20 uint4 0 3 1 2 -draw quad -todo probe all rgba (1.0, 1.0, 1.0, 1.0) +todo draw quad +todo(sm<4) probe all rgba (1.0, 1.0, 1.0, 1.0)
[require] shader model >= 4.0 diff --git a/tests/hlsl/normalize.shader_test b/tests/hlsl/normalize.shader_test index 8b181dfa5..9f350a7ee 100644 --- a/tests/hlsl/normalize.shader_test +++ b/tests/hlsl/normalize.shader_test @@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.554700196, 0.832050323, 0.0, 0.0) 1
[pixel shader] diff --git a/tests/hlsl/reflect.shader_test b/tests/hlsl/reflect.shader_test index 25890086b..03772dfa9 100644 --- a/tests/hlsl/reflect.shader_test +++ b/tests/hlsl/reflect.shader_test @@ -79,7 +79,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.0 0.0 uniform 4 float4 0.6 0.4 -0.3 1.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.188, -0.308, 0.0, 0.0) 4
[pixel shader] @@ -97,5 +97,5 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.2 0.0 uniform 4 float4 0.6 0.4 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.188, -0.308, 0.0, 0.0) 4 diff --git a/tests/hlsl/return.shader_test b/tests/hlsl/return.shader_test index fbea07926..e1c32bf87 100644 --- a/tests/hlsl/return.shader_test +++ b/tests/hlsl/return.shader_test @@ -25,8 +25,7 @@ void main(out float4 ret : sv_target) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
float4 main() : sv_target @@ -38,14 +37,13 @@ float4 main() : sv_target
[test] uniform 0 float 0.2 -draw quad +todo(sm<4) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) uniform 0 float 0.8 -draw quad +todo(sm<4) draw quad probe all rgba (0.5, 0.6, 0.7, 0.8)
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -65,14 +63,13 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.2 -draw quad +todo(sm<4) draw quad probe all rgba (0.3, 0.4, 0.5, 0.6) uniform 0 float 0.8 -draw quad +todo(sm<4) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -92,17 +89,16 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) 1 uniform 0 float 0.5 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.2, 0.3, 0.4, 0.5) 1 uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.5, 0.6, 0.7, 0.8) 1
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -119,17 +115,16 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) 1 uniform 0 float 0.5 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.5, 0.6, 0.7, 0.8) 1 uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.4, 0.5, 0.6, 0.7) 1
-[pixel shader] - +[pixel shader todo(sm<4)] void main(out float4 ret : sv_target) { ret = float4(0.1, 0.2, 0.3, 0.4); @@ -143,11 +138,10 @@ void main(out float4 ret : sv_target) }
[test] -draw quad +todo(sm<4) draw quad probe all rgba (0.2, 0.4, 0.6, 0.8)
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -166,27 +160,26 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.1, 0.1, 0.1, 0.1) 1
uniform 0 float 0.1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.2, 0.2, 0.2, 0.2) 1
uniform 0 float 0.3 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 0 float 0.7 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.8, 0.8, 0.8, 0.8) 1
uniform 0 float 0.9 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.9, 0.9, 0.9, 0.9) 1
-[pixel shader] - +[pixel shader todo(sm<4)] uniform float f;
void main(out float4 ret : sv_target) @@ -211,13 +204,13 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.2 -draw quad +todo(sm<4) draw quad probe all rgba (0.2, 0.2, 0.2, 0.2) uniform 0 float 0.8 -draw quad +todo(sm<4) draw quad probe all rgba (0.5, 0.5, 0.5, 0.5)
-[pixel shader] +[pixel shader todo(sm<4)]
uniform float4 f[3];
@@ -243,21 +236,21 @@ void main(out float4 ret : sv_target) uniform 0 float4 0.3 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.1 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.1, 0.1, 0.1, 0.1) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.1, 0.1, 0.1, 0.1) 1
uniform 4 float4 0.35 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.2, 0.2, 0.2, 0.2) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.2, 0.2, 0.2, 0.2) 1
uniform 8 float4 0.5 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.4, 0.4, 0.4, 0.4) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 0 float4 1.0 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.4, 0.4, 0.4, 0.4) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 4 float4 2.0 0.0 0.0 0.0 -todo(sm>=6) draw quad -todo(sm>=6) probe all rgba (0.9, 0.9, 0.9, 0.9) 1 +todo(sm<4 | sm>=6) draw quad +probe all rgba (0.9, 0.9, 0.9, 0.9) 1 diff --git a/tests/hlsl/round.shader_test b/tests/hlsl/round.shader_test index b9234b010..7b4c68cb7 100644 --- a/tests/hlsl/round.shader_test +++ b/tests/hlsl/round.shader_test @@ -13,7 +13,7 @@ probe all rgba (0.0, -7.0, 8.0, 3.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -26,12 +26,12 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.4 -6.6 7.6 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (-7.0, 8.0, 0.0, 3.0) 4
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -42,5 +42,5 @@ float4 main() : sv_target
[test] uniform 0 float4 -1 0 2 10 -draw quad +todo(sm<4) draw quad probe all rgba (-1.0, 0.0, 2.0, 10.0) 4 diff --git a/tests/hlsl/sample-bias.shader_test b/tests/hlsl/sample-bias.shader_test index 5b7067b52..4750947ef 100644 --- a/tests/hlsl/sample-bias.shader_test +++ b/tests/hlsl/sample-bias.shader_test @@ -18,7 +18,7 @@ void main(float4 pos : position, out float2 tex : texcoord, out float4 out_pos : out_pos = pos; }
-[pixel shader] +[pixel shader todo(sm<4)] sampler s; Texture2D t; uniform float bias; @@ -32,13 +32,13 @@ float4 main(float2 coord : texcoord) : sv_target
[test] uniform 0 float4 6.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (10.0, 0.0, 10.0, 0.0)
uniform 0 float4 7.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (4.0, 0.0, 10.0, 0.0)
uniform 0 float4 8.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.0, 0.0, 10.0, 0.0) diff --git a/tests/hlsl/sample-level.shader_test b/tests/hlsl/sample-level.shader_test index 8b2890ff7..4618fc577 100644 --- a/tests/hlsl/sample-level.shader_test +++ b/tests/hlsl/sample-level.shader_test @@ -14,7 +14,7 @@ levels 2
0.0 0.0 1.0 0.0
-[pixel shader] +[pixel shader todo(sm<4)] sampler s; Texture2D t; uniform float level; @@ -26,13 +26,13 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1.0, 0.0, 1.0, 0.0) uniform 0 float4 0.5 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.5, 0.0, 1.0, 0.0) uniform 0 float4 1.0 0.0 0.0 0.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.0, 0.0, 1.0, 0.0)
[require] @@ -54,7 +54,7 @@ draw quad probe all rgba (1.0, 0.0, 1.0, 0.0) uniform 0 float4 0.5 0.0 0.0 0.0 draw quad -probe all rgba (0.5, 0.0, 1.0, 0.0) +todo(sm<4) probe all rgba (0.5, 0.0, 1.0, 0.0) uniform 0 float4 1.0 0.0 0.0 0.0 draw quad -probe all rgba (0.0, 0.0, 1.0, 0.0) +todo(sm<4) probe all rgba (0.0, 0.0, 1.0, 0.0) diff --git a/tests/hlsl/sampler.shader_test b/tests/hlsl/sampler.shader_test index caff7b2fa..9a5fa6df4 100644 --- a/tests/hlsl/sampler.shader_test +++ b/tests/hlsl/sampler.shader_test @@ -7,7 +7,7 @@ size (2, 2) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0
-[pixel shader] +[pixel shader todo(sm<4)] sampler s; Texture2D t;
@@ -17,10 +17,10 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.25, 0, 0.25, 0)
-[pixel shader] +[pixel shader todo(sm<4)] SamplerState s; Texture2D t;
@@ -30,7 +30,7 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.25, 0, 0.25, 0)
[pixel shader fail] diff --git a/tests/hlsl/saturate.shader_test b/tests/hlsl/saturate.shader_test index 2ed83cf66..6852015b2 100644 --- a/tests/hlsl/saturate.shader_test +++ b/tests/hlsl/saturate.shader_test @@ -11,7 +11,7 @@ uniform 0 float4 0.7 -0.1 0.0 0.0 todo(sm>=6) draw quad probe all rgba (0.7, 0.0, 1.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -22,5 +22,5 @@ float4 main() : sv_target
[test] uniform 0 float4 -2 0 2 -1 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.0, 0.0, 1.0, 0.0) diff --git a/tests/hlsl/sign.shader_test b/tests/hlsl/sign.shader_test index 5d8b43168..6ec5a571d 100644 --- a/tests/hlsl/sign.shader_test +++ b/tests/hlsl/sign.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float f;
float4 main() : sv_target @@ -8,16 +8,16 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 -1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (-1.0, -1.0, -1.0, -1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f;
float4 main() : sv_target @@ -27,10 +27,10 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float2x2 f;
float4 main() : sv_target @@ -41,14 +41,14 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 0.0 0.0 uniform 4 float4 3.0 4.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[require] % SM1-3 doesn't support integral types shader model >= 4.0
-[pixel shader] +[pixel shader todo(sm<4)] uniform int f;
float4 main() : sv_target @@ -67,7 +67,7 @@ uniform 0 int4 0 0 0 0 draw quad probe all rgba (0, 0, 0, 0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform int4 f;
float4 main() : sv_target @@ -80,7 +80,7 @@ uniform 0 int4 1 2 3 4 draw quad probe all rgba (1, 1, 1, 1)
-[pixel shader] +[pixel shader todo(sm<4)] uniform int2x2 f;
float4 main() : sv_target diff --git a/tests/hlsl/smoothstep.shader_test b/tests/hlsl/smoothstep.shader_test index 971f6d5d8..e5ef0f194 100644 --- a/tests/hlsl/smoothstep.shader_test +++ b/tests/hlsl/smoothstep.shader_test @@ -1,5 +1,3 @@ - - [pixel shader] float4 main() : sv_target { @@ -109,7 +107,7 @@ draw quad probe all rgba (0.028, 0.104, 0.216, 0.352) 6
-[pixel shader] +[pixel shader todo(sm<4)] // 4 division by zero warnings. // Only test compilation because result is implementation-dependent. float4 main() : sv_target diff --git a/tests/hlsl/static-initializer.shader_test b/tests/hlsl/static-initializer.shader_test index 217444308..0c51bac76 100644 --- a/tests/hlsl/static-initializer.shader_test +++ b/tests/hlsl/static-initializer.shader_test @@ -17,6 +17,7 @@ probe all rgba (0.8, 0.0, 0.0, 0.0)
[pixel shader fail(sm<6)] +// On SM1 this gives hr 0x88760b59. static uint i;
float4 main() : sv_target @@ -135,7 +136,7 @@ float4 main(Texture2D tex2) : sv_target }
-[pixel shader] +[pixel shader todo(sm<4)] Texture2D real_tex; static Texture2D tex = real_tex; sampler sam; @@ -146,11 +147,11 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4)
-[pixel shader] +[pixel shader todo(sm<4)] Texture2D real_tex; static Texture2D tex; sampler sam; @@ -162,7 +163,7 @@ float4 main() : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1, 2, 3, 4)
diff --git a/tests/hlsl/step.shader_test b/tests/hlsl/step.shader_test index e201e15f9..b965f33e1 100644 --- a/tests/hlsl/step.shader_test +++ b/tests/hlsl/step.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 f, p;
float4 main() : sv_target @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 5.0 -2.6 3.0 2.0 uniform 4 float4 1.0 -4.3 3.0 4.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 1.0, 1.0)
diff --git a/tests/hlsl/ternary.shader_test b/tests/hlsl/ternary.shader_test index 7b4c71f7b..b24c62067 100644 --- a/tests/hlsl/ternary.shader_test +++ b/tests/hlsl/ternary.shader_test @@ -8,10 +8,10 @@ float4 main() : sv_target
[test] uniform 0 float4 2.0 3.0 4.0 5.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (2.0, 3.0, 4.0, 5.0) uniform 0 float4 0.0 10.0 11.0 12.0 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (-1.0, 9.0, 10.0, 11.0)
[pixel shader] @@ -29,7 +29,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.1 3.0 4.0 5.0 -draw quad +todo(sm<4) draw quad probe all rgba (1.1, 2.0, 0.0, 0.0)
[pixel shader] @@ -47,7 +47,7 @@ shader model < 6.0
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo(sm<4) draw quad probe all rgba (0.5, 0.6, 0.7, 0.0)
[require] @@ -74,5 +74,5 @@ float4 main() : sv_target uniform 0 float4 0.0 1.0 0.0 -3.0 uniform 4 float4 1.0 2.0 3.0 4.0 uniform 8 float4 5.0 6.0 7.0 8.0 -draw quad +todo(sm<4) draw quad probe all rgba (5.0, 2.0, 7.0, 4.0) diff --git a/tests/hlsl/trigonometry.shader_test b/tests/hlsl/trigonometry.shader_test index 859881199..5d230d7c3 100644 --- a/tests/hlsl/trigonometry.shader_test +++ b/tests/hlsl/trigonometry.shader_test @@ -5,7 +5,7 @@ void main(float4 pos : position, out float tex : texcoord, out float4 out_pos : out_pos = pos; }
-[pixel shader] +[pixel shader todo(sm<4)] float4 main(float tex : texcoord) : sv_target { tex = floor(tex + 0.25); @@ -13,7 +13,7 @@ float4 main(float tex : texcoord) : sv_target }
[test] -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe ( 0, 0) rgba ( 0.00000000, 1.00000000, 0.00000000, 0.0) probe ( 1, 0) rgba ( 0.84147098, 0.54030231, 1.55740772, 0.0) 1024 probe ( 2, 0) rgba ( 0.90929743, -0.41614684, -2.18503986, 0.0) 1024 @@ -32,7 +32,7 @@ probe (14, 0) rgba ( 0.99060736, 0.13673722, 7.24460662, 0.0) 1024 probe (15, 0) rgba ( 0.65028784, -0.75968791, -0.85599340, 0.0) 1024
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a;
float4 main() : sv_target @@ -42,11 +42,11 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.52359877 2.61799387 3.14159265 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0.0, 500.0, 500.0, 0.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a;
float4 main() : sv_target @@ -56,11 +56,11 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.78539816 1.57079632 2.35619449 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (1000.0, 707.0, -0.0, -707.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 a;
float4 main() : sv_target @@ -72,5 +72,5 @@ float4 main() : sv_target % tan(pi/2) is an asymtote and therefore undefined % so check 0, pi/4, 3pi/4, pi uniform 0 float4 0.0 0.78539816 2.35619449 3.14159265 -todo(sm>=6) draw quad +todo(sm<4 | sm>=6) draw quad probe all rgba (0, 1000, -1000.0, 0) diff --git a/tests/hlsl/trunc.shader_test b/tests/hlsl/trunc.shader_test index 76ffdbbad..f1d23bf82 100644 --- a/tests/hlsl/trunc.shader_test +++ b/tests/hlsl/trunc.shader_test @@ -1,4 +1,4 @@ -[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -8,13 +8,13 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (0.0, 6.0, 7.0, 3.0) uniform 0 float4 -1.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (-1.0, 6.0, 7.0, 3.0)
-[pixel shader] +[pixel shader todo(sm<4)] uniform float4 u;
float4 main() : sv_target @@ -27,7 +27,7 @@ float4 main() : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo(sm<4) draw quad probe all rgba (6.0, 7.0, 0.0, 3.0)
[require] diff --git a/tests/hlsl/vector-indexing-uniform.shader_test b/tests/hlsl/vector-indexing-uniform.shader_test index e5ffbdd02..cd77462ec 100644 --- a/tests/hlsl/vector-indexing-uniform.shader_test +++ b/tests/hlsl/vector-indexing-uniform.shader_test @@ -1,6 +1,6 @@ % Use a uniform to prevent the compiler from optimizing.
-[pixel shader] +[pixel shader todo(sm<4)] uniform float i; float4 main() : SV_TARGET { @@ -12,5 +12,5 @@ float4 main() : SV_TARGET
[test] uniform 0 float 2 -draw quad +todo(sm<4) draw quad probe all rgba (0.5, 0.3, 0.8, 0.2) diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 80d5dfe77..250aaa5a8 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -968,8 +968,13 @@ unsigned int get_vb_stride(const struct shader_runner *runner, unsigned int slot return stride; }
-static HRESULT map_unidentified_hrs(HRESULT hr) +static HRESULT map_special_hrs(HRESULT hr) { + if (hr == 0x88760b59) + { + trace("Mapping hr %#x (D3DXERR_INVALIDDATA) as %#x.\n", hr, E_FAIL); + return E_FAIL; + } if (hr == 0x80010064) { trace("Mapping unidentified hr %#x as %#x.\n", hr, E_FAIL); @@ -1116,8 +1121,8 @@ static void compile_shader(struct shader_runner *runner, IDxcCompiler3 *dxc_comp
static const char *const shader_models[] = { - [SHADER_MODEL_2_0] = "4_0", - [SHADER_MODEL_3_0] = "4_0", + [SHADER_MODEL_2_0] = "2_0", + [SHADER_MODEL_3_0] = "3_0", [SHADER_MODEL_4_0] = "4_0", [SHADER_MODEL_4_1] = "4_1", [SHADER_MODEL_5_0] = "5_0", @@ -1146,7 +1151,7 @@ static void compile_shader(struct shader_runner *runner, IDxcCompiler3 *dxc_comp sprintf(profile, "%s_%s", shader_type_string(type), shader_models[runner->minimum_shader_model]); hr = D3DCompile(source, len, NULL, NULL, NULL, "main", profile, runner->compile_options, 0, &blob, &errors); } - hr = map_unidentified_hrs(hr); + hr = map_special_hrs(hr); ok(hr == expect, "Got unexpected hr %#x.\n", hr); if (hr == S_OK) { diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index d435a5d3d..e1271e756 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -412,8 +412,8 @@ static bool compile_shader(struct vulkan_shader_runner *runner, const char *sour
static const char *const shader_models[] = { - [SHADER_MODEL_2_0] = "4_0", - [SHADER_MODEL_3_0] = "4_0", + [SHADER_MODEL_2_0] = "2_0", + [SHADER_MODEL_3_0] = "3_0", [SHADER_MODEL_4_0] = "4_0", [SHADER_MODEL_4_1] = "4_1", [SHADER_MODEL_5_0] = "5_0", @@ -424,7 +424,11 @@ static bool compile_shader(struct vulkan_shader_runner *runner, const char *sour info.source.code = source; info.source.size = strlen(source); info.source_type = VKD3D_SHADER_SOURCE_HLSL; - info.target_type = VKD3D_SHADER_TARGET_DXBC_TPF; + if (runner->r.minimum_shader_model < SHADER_MODEL_4_0) + info.target_type = VKD3D_SHADER_TARGET_D3D_BYTECODE; + else + info.target_type = VKD3D_SHADER_TARGET_DXBC_TPF; + info.log_level = VKD3D_SHADER_LOG_WARNING;
info.options = options; @@ -468,7 +472,10 @@ static bool compile_shader(struct vulkan_shader_runner *runner, const char *sour
info.next = &spirv_info; info.source = *dxbc; - info.source_type = VKD3D_SHADER_SOURCE_DXBC_TPF; + if (runner->r.minimum_shader_model < SHADER_MODEL_4_0) + info.source_type = VKD3D_SHADER_SOURCE_D3D_BYTECODE; + else + info.source_type = VKD3D_SHADER_SOURCE_DXBC_TPF; info.target_type = VKD3D_SHADER_TARGET_SPIRV_BINARY;
spirv_info.next = &interface_info; @@ -1420,8 +1427,11 @@ void run_shader_tests_vulkan(void) if (!init_vulkan_runner(&runner)) return;
- trace("Compiling SM2-SM5 shaders with vkd3d-shader and executing with Vulkan\n"); - run_shader_tests(&runner.r, &vulkan_runner_ops, NULL, SHADER_MODEL_2_0, SHADER_MODEL_5_1); + trace("Compiling SM2-SM3 shaders with vkd3d-shader and executing with Vulkan\n"); + run_shader_tests(&runner.r, &vulkan_runner_ops, NULL, SHADER_MODEL_2_0, SHADER_MODEL_3_0); + + trace("Compiling SM4-SM5 shaders with vkd3d-shader and executing with Vulkan\n"); + run_shader_tests(&runner.r, &vulkan_runner_ops, NULL, SHADER_MODEL_4_0, SHADER_MODEL_5_1);
cleanup_vulkan_runner(&runner); }