summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2018-08-31 10:47:51 -0700
committerIan Romanick <ian.d.romanick@intel.com>2018-09-01 00:19:14 -0700
commitfc2e97fc2f2c18cb1fc4539811641117cfe2e4ae (patch)
tree052619f08a1fed8bdd59734c54f714b30e60647a
parenta9752f23ef3531c6c44fc60cfff9811862fd594a (diff)
glsl-1.10: Put an if-statement in a macro in the false path of an ifdef
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107772 Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Cc: Eero Tamminen <eero.t.tamminen@intel.com> Cc: Mark Janes <mark.a.janes@intel.com>
-rw-r--r--tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert b/tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert
new file mode 100644
index 000000000..938fe31f8
--- /dev/null
+++ b/tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// [end config]
+//
+// Reproduces https://bugs.freedesktop.org/show_bug.cgi?id=107772
+
+#version 110
+
+#ifdef NOT_DEFINED
+#define A_MACRO(x) \
+ if (x)
+#endif
+
+void main()
+{
+ gl_Position = vec4(0);
+}