From: Francisco Casas fcasas@codeweavers.com
--- .../cast-componentwise-compatible.shader_test | 132 ++++++++--------- tests/cast-componentwise-equal.shader_test | 134 +++++++++--------- 2 files changed, 137 insertions(+), 129 deletions(-)
diff --git a/tests/cast-componentwise-compatible.shader_test b/tests/cast-componentwise-compatible.shader_test index da55628b..ca7ea05e 100644 --- a/tests/cast-componentwise-compatible.shader_test +++ b/tests/cast-componentwise-compatible.shader_test @@ -59,70 +59,6 @@ draw quad probe all rgba (1.0, 2.0, 3.0, 4.0)
-[pixel shader] -Texture2D tex; - -struct apple -{ - int2 aa; - Texture2D bb; - float cc; -}; - -struct banana -{ - float aa[2]; - Texture2D bb; - int cc; -}; - -float4 main() : sv_target -{ - struct apple a = {1, 2, tex, 7.2}; - struct banana b; - - b = (struct banana) a; - return b.cc; -} - -[test] -draw quad -probe all rgba (7.0, 7.0, 7.0, 7.0) - - -[pixel shader] -Texture2D tex; - -struct apple -{ - int2 aa; - Texture2D bb; - float cc; - float4 dd; - Texture2D ee; -}; - -struct banana -{ - float aa[2]; - Texture2D bb; - int cc; -}; - -float4 main() : sv_target -{ - struct apple a = {1, 2, tex, 3, 4, 5, 6, 7, tex}; - struct banana b; - - b = (struct banana) a; - return b.cc; -} - -[test] -draw quad -probe all rgba (3.0, 3.0, 3.0, 3.0) - - [pixel shader fail] struct apple { @@ -582,3 +518,71 @@ float4 main() : sv_target [test] draw quad probe all rgba (71.0, 72.0, 73.0, 0.0) + + +[require] +shader model >= 5.0 + + +[pixel shader] +Texture2D tex; + +struct apple +{ + int2 aa; + Texture2D bb; + float cc; +}; + +struct banana +{ + float aa[2]; + Texture2D bb; + int cc; +}; + +float4 main() : sv_target +{ + struct apple a = {1, 2, tex, 7.2}; + struct banana b; + + b = (struct banana) a; + return b.cc; +} + +[test] +draw quad +probe all rgba (7.0, 7.0, 7.0, 7.0) + + +[pixel shader] +Texture2D tex; + +struct apple +{ + int2 aa; + Texture2D bb; + float cc; + float4 dd; + Texture2D ee; +}; + +struct banana +{ + float aa[2]; + Texture2D bb; + int cc; +}; + +float4 main() : sv_target +{ + struct apple a = {1, 2, tex, 3, 4, 5, 6, 7, tex}; + struct banana b; + + b = (struct banana) a; + return b.cc; +} + +[test] +draw quad +probe all rgba (3.0, 3.0, 3.0, 3.0) diff --git a/tests/cast-componentwise-equal.shader_test b/tests/cast-componentwise-equal.shader_test index 4c85b9ed..34f1abbb 100644 --- a/tests/cast-componentwise-equal.shader_test +++ b/tests/cast-componentwise-equal.shader_test @@ -93,71 +93,6 @@ draw quad probe all rgba (5.0, 6.0, 7.0, 8.0)
-[pixel shader] -Texture2D tex; - -struct apple -{ - int2 aa; - Texture2D bb; - float cc; -}; - -struct banana -{ - int aa[2]; - Texture2D bb; - float cc; -}; - -float4 main() : sv_target -{ - struct apple a = {1, 2, tex, 4}; - struct banana b; - - b = a; - return b.cc; -} - -[test] -draw quad -probe all rgba (4.0, 4.0, 4.0, 4.0) - - -[pixel shader] -Texture2D tex; - -struct apple -{ - int2 aa; - Texture2D bb; - float cc; -}; - -struct banana -{ - int aa[2]; - Texture2D bb; - float cc; -}; - -float4 fun(struct banana b) -{ - return b.cc; -} - -float4 main() : sv_target -{ - struct apple a = {1, 2, tex, 5}; - - return fun(a); -} - -[test] -todo draw quad -todo probe all rgba (5.0, 5.0, 5.0, 5.0) - - [pixel shader] struct apple { @@ -314,3 +249,72 @@ float4 main() : SV_TARGET
return 0; } + + +[require] +shader model >= 5.0 + + +[pixel shader] +Texture2D tex; + +struct apple +{ + int2 aa; + Texture2D bb; + float cc; +}; + +struct banana +{ + int aa[2]; + Texture2D bb; + float cc; +}; + +float4 main() : sv_target +{ + struct apple a = {1, 2, tex, 4}; + struct banana b; + + b = a; + return b.cc; +} + +[test] +draw quad +probe all rgba (4.0, 4.0, 4.0, 4.0) + + +[pixel shader] +Texture2D tex; + +struct apple +{ + int2 aa; + Texture2D bb; + float cc; +}; + +struct banana +{ + int aa[2]; + Texture2D bb; + float cc; +}; + +float4 fun(struct banana b) +{ + return b.cc; +} + +float4 main() : sv_target +{ + struct apple a = {1, 2, tex, 5}; + + return fun(a); +} + +[test] +todo draw quad +todo probe all rgba (5.0, 5.0, 5.0, 5.0)