[Piglit] [PATCH 2/4] glsl-es-3.00: Add test for line continuation

Ian Romanick idr at freedesktop.org
Sat Nov 17 17:08:51 PST 2012


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

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 .../glsl-es-3.00/compiler/line-continuation.vert   | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 tests/spec/glsl-es-3.00/compiler/line-continuation.vert

diff --git a/tests/spec/glsl-es-3.00/compiler/line-continuation.vert b/tests/spec/glsl-es-3.00/compiler/line-continuation.vert
new file mode 100644
index 0000000..527e9e7
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/line-continuation.vert
@@ -0,0 +1,27 @@
+#version 300 es
+
+/* [config]
+ * expect_result: pass
+ * glsl_version: 3.00
+ * [end config]
+ *
+ * Page 8 (page 14 of the PDF) of the OpenGL ES Shading Language 3.00 spec
+ * says:
+ *
+ *     "Backslash ('\'), used to indicate line continuation when immediately
+ *     preceding a new-line."
+ */
+
+#define some_macro \
+  junk \
+  junk
+
+
+void main()
+{
+  /* Nothing says that line continuation can only be used in a macro
+   * definition, even though that's the only sensible place to use it.
+   */
+  gl_Position = \
+    vec4(0.);
+}
-- 
1.7.11.7



More information about the Piglit mailing list