summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChad Versace <chad.versace@intel.com>2010-11-11 08:26:50 -0800
committerChad Versace <chad.versace@intel.com>2010-12-01 14:21:21 -0800
commitd538f31bab1f6f0ac0b98d3bc34de5df6ca901d3 (patch)
treef63494dabe71572160bf248b120ef5135aefd46a /examples
parenteb0c27960ec46033d80dceebec18e65cfae273c8 (diff)
examples: Add example test files for GLSLParserTest
Class GLSLParserTest is added in a future commit.
Diffstat (limited to 'examples')
-rw-r--r--examples/glsl_parser_test/ReadMe.txt3
-rw-r--r--examples/glsl_parser_test/bit-logic-assign.frag21
-rw-r--r--examples/glsl_parser_test/bit-logic.vert18
3 files changed, 42 insertions, 0 deletions
diff --git a/examples/glsl_parser_test/ReadMe.txt b/examples/glsl_parser_test/ReadMe.txt
new file mode 100644
index 00000000..21b00a5e
--- /dev/null
+++ b/examples/glsl_parser_test/ReadMe.txt
@@ -0,0 +1,3 @@
+This directory holds example test files that can be registered with Piglit
+with ``add_glsl_parser_test()``. For a decription of the the test's
+behavior and file format, see the docstrings in file glsl_parser_test.py.
diff --git a/examples/glsl_parser_test/bit-logic-assign.frag b/examples/glsl_parser_test/bit-logic-assign.frag
new file mode 100644
index 00000000..78eff0f4
--- /dev/null
+++ b/examples/glsl_parser_test/bit-logic-assign.frag
@@ -0,0 +1,21 @@
+// The config section below is required.
+//
+// [config]
+// # The config section may contain comments.
+// expect_result: pass
+// glsl_version: 1.30
+// [end config]
+//
+// Description: bit-logic assignment ops with argument type (int, int)
+//
+// From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
+// "The operands must be of type signed or unsigned integers or integer
+// vectors."
+
+#version 130
+void main() {
+ int x = 0;
+ x &= 1;
+ x |= 1;
+ x ^= 1;
+}
diff --git a/examples/glsl_parser_test/bit-logic.vert b/examples/glsl_parser_test/bit-logic.vert
new file mode 100644
index 00000000..9b7ffedd
--- /dev/null
+++ b/examples/glsl_parser_test/bit-logic.vert
@@ -0,0 +1,18 @@
+/* The config section below is required.
+ *
+ * [config]
+ * # The config section may contain comments.
+ * expect_result: fail
+ * glsl_version: 1.30
+ * [end config]
+ *
+ * Description: bit-and with argument type (int, uint)
+ *
+ * From page 50 (page 56 of PDF) of the GLSL 1.30 spec:
+ * "The fundamental types of the operands (signed or unsigned) must match"
+ */
+
+#version 130
+void main() {
+ int x = int(7) & uint(1);
+}