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

Alexandre Julliard julliard at winehq.org
Fri Jan 22 15:48:01 CST 2021


Module: vkd3d
Branch: master
Commit: 6520fb153e6e49c0e9b7b0eef6e711d9c1efa8b6
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=6520fb153e6e49c0e9b7b0eef6e711d9c1efa8b6

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Thu Jan 21 16:10:47 2021 -0600

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

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 Makefile.am                 | 2 --
 libs/vkd3d-shader/preproc.y | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 76a2f31..27d933c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -243,8 +243,6 @@ XFAIL_TESTS = \
 	tests/hlsl-vector-indexing.shader_test \
 	tests/hlsl-vector-indexing-uniform.shader_test \
 	tests/math.shader_test \
-	tests/preproc-if-expr.shader_test \
-	tests/preproc-macro.shader_test \
 	tests/swizzle-0.shader_test \
 	tests/swizzle-1.shader_test \
 	tests/swizzle-2.shader_test \
diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
index aa381e8..7a99543 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -693,6 +693,10 @@ primary_expr
             $$ = !!preproc_find_macro(ctx, $3);
             vkd3d_free($3);
         }
+    | '(' expr ')'
+        {
+            $$ = $2;
+        }
 
 unary_expr
     : primary_expr




More information about the wine-cvs mailing list