Module: vkd3d Branch: master Commit: f8da1000524388bfbd19243c72e8d57956e0bd7b URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/f8da1000524388bfbd19243c72e8d5...
Author: Zebediah Figura zfigura@codeweavers.com Date: Mon Sep 26 18:54:09 2022 -0500
vkd3d-shader/hlsl: Use hlsl_new_int_constant() in the "primary_expr" rule.
---
libs/vkd3d-shader/hlsl.y | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 50a3a094..fc3b31a4 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -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; }