From: Zebediah Figura zfigura@codeweavers.com
Fixes: 4c46075d864c2959a0c042c6bc7201fc40c414ba --- libs/vkd3d-shader/hlsl.y | 3 ++- tests/hlsl-function.shader_test | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 7caba3e0..95c1c0fa 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -4138,12 +4138,13 @@ func_prototype_no_attrs: { if (!($$.decl = hlsl_new_func_decl(ctx, type, &$5, &$7.semantic, &@3))) YYABORT; - ctx->cur_function = $$.decl;
hlsl_add_function(ctx, $3, $$.decl);
$$.first = true; } + + ctx->cur_function = $$.decl; }
func_prototype: diff --git a/tests/hlsl-function.shader_test b/tests/hlsl-function.shader_test index 75521d4d..c836808d 100644 --- a/tests/hlsl-function.shader_test +++ b/tests/hlsl-function.shader_test @@ -177,7 +177,7 @@ float4 main() : sv_target
[test] draw quad -todo probe all rgba (0.1, 0.2, 0.3, 0.4) +probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader]