diff --git a/tests/hlsl/effect-compile.shader_test b/tests/hlsl/effect-compile.shader_test index f1a19f25..acfab529 100644 --- a/tests/hlsl/effect-compile.shader_test +++ b/tests/hlsl/effect-compile.shader_test @@ -183,6 +183,42 @@ float4 main() : sv_target return 0; } + +% Default values are allowed for uniform variables. +[pixel shader todo fail(sm>=6)] +float4 fun(uniform float4 a, uniform float4 b = {1, 2, 3, 4}) : sv_target +{ + return 8*a + b; +} + +technique10 T1 +{ + pass P1 + { + PixelShader = compile ps_4_0 fun(5); + } +} + +float4 main() : sv_target { return 0; } + + +[pixel shader todo fail(sm>=6)] +float4 fun(float4 a : COLOR0 = {-1, -2, -3, -4}, uniform float4 b = {1, 2, 3, 4}) : sv_target +{ + return 8*a + b; +} + +technique10 T1 +{ + pass P1 + { + PixelShader = compile ps_4_0 fun(); + } +} + +float4 main() : sv_target { return 0; } + + [require] shader model >= 5.0 shader model < 6.0