[Piglit] [PATCH] glsl-1.10: Put an if-statement in a macro in the false path of an ifdef

Ian Romanick idr at freedesktop.org
Fri Aug 31 17:49:33 UTC 2018


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107772
Cc: Timothy Arceri <tarceri at itsqueeze.com>
Cc: Eero Tamminen <eero.t.tamminen at intel.com>
Cc: Mark Janes <mark.a.janes at intel.com>
---
 .../if-statement-in-macro-in-false-ifdef.vert          | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 tests/spec/glsl-1.10/preprocessor/if-statement-in-macro-in-false-ifdef.vert

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);
+}
-- 
2.14.4



More information about the Piglit mailing list