[Piglit] [PATCH 05/11] arb_shading_language_420pack: Add negative scalar.length test.

Matt Turner mattst88 at gmail.com
Fri May 24 18:28:02 PDT 2013


---
 .../compiler/length-scalar.frag                      | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 tests/spec/arb_shading_language_420pack/compiler/length-scalar.frag

diff --git a/tests/spec/arb_shading_language_420pack/compiler/length-scalar.frag b/tests/spec/arb_shading_language_420pack/compiler/length-scalar.frag
new file mode 100644
index 0000000..e04ece9
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/length-scalar.frag
@@ -0,0 +1,20 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+
+#version 130
+#extension GL_ARB_shading_language_420pack: enable
+
+/* The ARB_shading_language_420pack spec says:
+ *     "The *length* method may be applied to vectors (but not scalars)."
+ *
+ * Verify that scalar.length() generates an error.
+ */
+
+void main() {
+    float x;
+    gl_FragColor = vec4(x.length());
+}
-- 
1.8.1.5



More information about the Piglit mailing list