From 1d24587405af5204a124eef7b4ddbf02e88f2581 Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Tue, 18 Jun 2024 00:39:59 -0400 Subject: [PATCH] tests: Test compile syntax on effects. --- tests/hlsl/effect-compile.shader_test | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tests/hlsl/effect-compile.shader_test b/tests/hlsl/effect-compile.shader_test index 6dd06340..e4ff954a 100644 --- a/tests/hlsl/effect-compile.shader_test +++ b/tests/hlsl/effect-compile.shader_test @@ -161,3 +161,38 @@ float4 main() : sv_target return 0; } + + +[require] +shader model >= 4.0 +shader model < 6.0 + + +[effect fail] +float4 fun(uniform float4 a, float4 b : FOO) : sv_target +{ + return 0; +} + +technique10 T0 +{ + pass P0 + { + PixelShader = compile ps_4_0 fun(4, 5); + } +} + + +[effect todo] +float4 fun(uniform float4 a, float4 b : FOO) : sv_target +{ + return 10 * a + b; +} + +technique10 T0 +{ + pass P0 + { + PixelShader = compile ps_4_0 fun(4); + } +}