From e56db9bda5d11acd746449552da3aae9f5feb81b Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Mon, 10 Oct 2022 19:23:00 -0300 Subject: [PATCH] tests: Test for invalid complex broadcasts. --- tests/cast-broadcast.shader_test | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/cast-broadcast.shader_test b/tests/cast-broadcast.shader_test index 26ae7997..f60eb758 100644 --- a/tests/cast-broadcast.shader_test +++ b/tests/cast-broadcast.shader_test @@ -21,3 +21,50 @@ float4 main() : SV_TARGET [test] todo draw quad todo probe all rgba (84.0, 84.0, 84.0, 84.0) + + +[pixel shader fail todo] +struct apple +{ + float3 aa; + float4 bb; +}; + +float4 main() : SV_TARGET +{ + struct apple f = 31; + return f.bb; +} + + +[pixel shader fail] +struct apple +{ + float3 aa; + float4 bb; +}; + +float4 fun(struct apple f) +{ + return f.bb; +} + +float4 main() : SV_TARGET +{ + return fun(31); +} + + +[pixel shader fail] +struct apple +{ + float4 foo; + Texture2D tex; +}; + +float4 PSMain() : SV_TARGET +{ + struct apple a1; + a1 = (struct apple)1; + return a1.foo; +}