vkd3d-shader: Implement the parenthetical operator in #if directives.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-01-21 16:10:47 -06:00 committed by Alexandre Julliard
parent e15b884e1a
commit 6520fb153e
2 changed files with 4 additions and 2 deletions

View File

@ -243,8 +243,6 @@ XFAIL_TESTS = \
tests/hlsl-vector-indexing.shader_test \ tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \ tests/hlsl-vector-indexing-uniform.shader_test \
tests/math.shader_test \ tests/math.shader_test \
tests/preproc-if-expr.shader_test \
tests/preproc-macro.shader_test \
tests/swizzle-0.shader_test \ tests/swizzle-0.shader_test \
tests/swizzle-1.shader_test \ tests/swizzle-1.shader_test \
tests/swizzle-2.shader_test \ tests/swizzle-2.shader_test \

View File

@ -693,6 +693,10 @@ primary_expr
$$ = !!preproc_find_macro(ctx, $3); $$ = !!preproc_find_macro(ctx, $3);
vkd3d_free($3); vkd3d_free($3);
} }
| '(' expr ')'
{
$$ = $2;
}
unary_expr unary_expr
: primary_expr : primary_expr