mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Discern between signed and unsigned ints when parsing.
This commit is contained in:
committed by
Alexandre Julliard
parent
1ee9e23e00
commit
4e1bf5e163
Notes:
Alexandre Julliard
2023-11-22 22:49:11 +01:00
Approved-by: Zebediah Figura (@zfigura) 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/478
@@ -4975,6 +4975,7 @@ static void check_duplicated_switch_cases(struct hlsl_ctx *ctx, const struct hls
|
||||
%token <floatval> C_FLOAT
|
||||
|
||||
%token <intval> C_INTEGER
|
||||
%token <intval> C_UNSIGNED
|
||||
%token <intval> PRE_LINE
|
||||
|
||||
%type <list> type_specs
|
||||
@@ -6709,6 +6710,15 @@ primary_expr:
|
||||
if (!($$ = make_block(ctx, c)))
|
||||
YYABORT;
|
||||
}
|
||||
| C_UNSIGNED
|
||||
{
|
||||
struct hlsl_ir_node *c;
|
||||
|
||||
if (!(c = hlsl_new_uint_constant(ctx, $1, &@1)))
|
||||
YYABORT;
|
||||
if (!($$ = make_block(ctx, c)))
|
||||
YYABORT;
|
||||
}
|
||||
| boolean
|
||||
{
|
||||
struct hlsl_ir_node *c;
|
||||
|
||||
Reference in New Issue
Block a user