vkd3d-shader/hlsl: Always set ctx->cur_function in the func_prototype_no_attrs rule.

Fixes: 4c46075d864c2959a0c042c6bc7201fc40c414ba
This commit is contained in:
Zebediah Figura 2023-02-13 17:40:18 -06:00 committed by Alexandre Julliard
parent cd6e8b5540
commit 0e60f4cc69
Notes: Alexandre Julliard 2023-02-14 22:23:01 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/91
2 changed files with 3 additions and 2 deletions

View File

@ -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:

View File

@ -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]