mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Use hlsl_new_int_constant() in the "primary_expr" rule.
This commit is contained in:
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
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user