mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Return an "error" expression when using an undeclared variable.
This commit is contained in:
parent
67093c5833
commit
5d52bef19d
Notes:
Henri Verbeet
2024-10-03 19:34:42 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1110
@ -8682,7 +8682,11 @@ primary_expr:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Identifier \"%s\" is not declared.", $1);
|
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Identifier \"%s\" is not declared.", $1);
|
||||||
YYABORT;
|
vkd3d_free($1);
|
||||||
|
|
||||||
|
if (!($$ = make_empty_block(ctx)))
|
||||||
|
YYABORT;
|
||||||
|
$$->value = ctx->error_instr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user