vkd3d-shader/hlsl: Use hlsl_new_int_constant() in the "primary_expr" rule.

This commit is contained in:
Zebediah Figura 2022-09-26 18:54:09 -05:00 committed by Alexandre Julliard
parent 3fc2fdc37f
commit f8da100052
Notes: Alexandre Julliard 2022-10-18 00:13:00 +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/22

View File

@ -3990,10 +3990,8 @@ primary_expr:
{
struct hlsl_ir_constant *c;
if (!(c = hlsl_alloc(ctx, sizeof(*c))))
if (!(c = hlsl_new_int_constant(ctx, $1, &@1)))
YYABORT;
init_node(&c->node, HLSL_IR_CONSTANT, hlsl_get_scalar_type(ctx, HLSL_TYPE_INT), @1);
c->value[0].i = $1;
if (!($$ = make_list(ctx, &c->node)))
YYABORT;
}