[Piglit] [PATCH 01/11] arb_shading_language_420pack: Add line continuation test.

Matt Turner mattst88 at gmail.com
Fri May 24 18:27:58 PDT 2013


---
 .../compiler/line-continuation.frag                | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/line-continuation.frag

diff --git a/tests/spec/arb_shading_language_420pack/compiler/line-continuation.frag b/tests/spec/arb_shading_language_420pack/compiler/line-continuation.frag
new file mode 100644
index 0000000..2306f35
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/line-continuation.frag
@@ -0,0 +1,33 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.30
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+
+/*
+ * The ARB_shading_language_420pack says:
+ * 
+ *    "Including the following line in a shader will enable module import and
+ *     related extended language features described in this extension:
+ *
+ *             #extension GL_ARB_shading_language_420pack : <behavior>
+ *
+ *     where <behavior> is as specified in section 3.3 for the #extension
+ *     directive."
+ *
+ * As a result, strictly speaking we need to enable the extension before line
+ * continuation is enabled.
+ */
+#version 130
+#extension GL_ARB_shading_language_420pack: enable
+
+/* Make sure it works in comments too.*\
+/
+
+uniform vec4 f\
+oo;
+
+void main() {
+	gl_FragColor = foo;
+}
-- 
1.8.1.5



More information about the Piglit mailing list