mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Store the function body directly in the hlsl_ir_function_decl structure.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
423213fb05
commit
8485a7c450
@@ -2053,7 +2053,7 @@ hlsl_prog:
|
||||
decl = get_func_decl(&ctx->functions, $2.name, $2.decl->parameters);
|
||||
if (decl && !decl->func->intrinsic)
|
||||
{
|
||||
if (decl->body && $2.decl->body)
|
||||
if (decl->has_body && $2.decl->has_body)
|
||||
{
|
||||
hlsl_error(ctx, $2.decl->loc, VKD3D_SHADER_ERROR_HLSL_REDEFINED,
|
||||
"Function \"%s\" is already defined.", $2.name);
|
||||
@@ -2247,7 +2247,9 @@ func_declaration:
|
||||
func_prototype compound_statement
|
||||
{
|
||||
$$ = $1;
|
||||
$$.decl->body = $2;
|
||||
$$.decl->has_body = true;
|
||||
list_move_tail(&$$.decl->body, $2);
|
||||
vkd3d_free($2);
|
||||
hlsl_pop_scope(ctx);
|
||||
}
|
||||
| func_prototype ';'
|
||||
|
||||
Reference in New Issue
Block a user