vkd3d-shader/hlsl: Use add_unary_arithmetic_expr() in the subtraction rule.

This commit is contained in:
Zebediah Figura 2022-11-11 20:34:40 -06:00 committed by Alexandre Julliard
parent b4bf5af475
commit 588784e4dc
Notes: Alexandre Julliard 2023-06-28 23:03:54 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/230

View File

@ -6184,9 +6184,8 @@ add_expr:
{
struct hlsl_ir_node *neg;
if (!(neg = hlsl_new_unary_expr(ctx, HLSL_OP1_NEG, node_from_list($3), &@2)))
if (!(neg = add_unary_arithmetic_expr(ctx, $3, HLSL_OP1_NEG, node_from_list($3), &@2)))
YYABORT;
list_add_tail($3, &neg->entry);
$$ = add_binary_expr_merge(ctx, $1, $3, HLSL_OP2_ADD, &@2);
}