From f15d8dc9e92ddbc513de46d71945d8e489c80579 Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Thu, 6 Jun 2024 16:00:18 -0400 Subject: [PATCH] tests: Separate the valid stateblock function names test from the string arg test. This test is important because it checks that all the valid names for stateblock functions with the expected amount of arguments are tested, but, after parsing state block function calls, the only reason it is not passing is that we don't parse strings yet. --- .../state-block-function-syntax.shader_test | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/tests/hlsl/state-block-function-syntax.shader_test b/tests/hlsl/state-block-function-syntax.shader_test index 8af53ec5..53279a36 100644 --- a/tests/hlsl/state-block-function-syntax.shader_test +++ b/tests/hlsl/state-block-function-syntax.shader_test @@ -3,21 +3,30 @@ [pixel shader todo] sampler sam { - SetBlendState(foo, bar, baz); // 3 parameters - SetDepthStencilState(foo, 2); // 2 parameters - SetRasterizerState(foo); // 1 parameter - SetVertexShader(vs); // 1 parameter - SetDomainShader(ds); // 1 paramter - SetHullShader(100); // 1 parameter - SetGeometryShader(foo + bar); // 1 parameter - SetPixelShader(ps1); // 1 parameter - SetComputeShader("random string"); // 1 parameter + SetBlendState(foo, bar, baz); // 3 parameters + SetDepthStencilState(foo, 2); // 2 parameters + SetRasterizerState(foo); // 1 parameter + SetVertexShader(vs); // 1 parameter + SetDomainShader(ds); // 1 paramter + SetHullShader(100); // 1 parameter + SetGeometryShader(foo + bar); // 1 parameter + SetPixelShader(ps1); // 1 parameter + SetComputeShader(ARG); // 1 parameter OMSetRenderTargets(RTV0, RTV1, RTV2, RTV3, RTV4, RTV5, RTV6, RTV7, DSV); // 2 to 9 parameters }; float4 main() : sv_target { return 0; } +[pixel shader todo] +sampler sam +{ + SetComputeShader("random string"); +}; + +float4 main() : sv_target { return 0; } + + [pixel shader fail(sm<6)] sampler sam {