[Piglit] [PATCH 19/23] Port illegal shader glsl tests from Glean to Piglit.

Fabian Bieler fabianbieler at fastmail.fm
Thu Nov 23 20:46:11 UTC 2017


---
 tests/spec/glsl-1.10/compiler/assignment-without-rhs.frag   | 11 +++++++++++
 tests/spec/glsl-1.10/compiler/break-with-no-loop.frag       | 11 +++++++++++
 tests/spec/glsl-1.10/compiler/continue-with-no-loop.frag    | 11 +++++++++++
 tests/spec/glsl-1.10/compiler/if-boolean-scalar-check.frag  | 13 +++++++++++++
 tests/spec/glsl-1.10/compiler/illegal-assignment.frag       | 11 +++++++++++
 tests/spec/glsl-1.10/compiler/main-without-return-type.frag |  9 +++++++++
 .../two-immediate-float-constants-without-operator.frag     | 11 +++++++++++
 .../compiler/undefined-variable-in-selection-operator.frag  | 12 ++++++++++++
 tests/spec/glsl-1.10/compiler/undefined-variable.frag       | 11 +++++++++++
 9 files changed, 100 insertions(+)
 create mode 100644 tests/spec/glsl-1.10/compiler/assignment-without-rhs.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/break-with-no-loop.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/continue-with-no-loop.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/if-boolean-scalar-check.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/illegal-assignment.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/main-without-return-type.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/two-immediate-float-constants-without-operator.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/undefined-variable-in-selection-operator.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/undefined-variable.frag

diff --git a/tests/spec/glsl-1.10/compiler/assignment-without-rhs.frag b/tests/spec/glsl-1.10/compiler/assignment-without-rhs.frag
new file mode 100644
index 0000000..75ca9d4
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/assignment-without-rhs.frag
@@ -0,0 +1,11 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void main()
+{
+	float x = ;
+	gl_FragColor = vec4(0.5);
+}
diff --git a/tests/spec/glsl-1.10/compiler/break-with-no-loop.frag b/tests/spec/glsl-1.10/compiler/break-with-no-loop.frag
new file mode 100644
index 0000000..48376ed
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/break-with-no-loop.frag
@@ -0,0 +1,11 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void main()
+{
+	break;
+	gl_FragColor = vec4(0.5);
+}
diff --git a/tests/spec/glsl-1.10/compiler/continue-with-no-loop.frag b/tests/spec/glsl-1.10/compiler/continue-with-no-loop.frag
new file mode 100644
index 0000000..206e91b
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/continue-with-no-loop.frag
@@ -0,0 +1,11 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void main()
+{
+	continue;
+	gl_FragColor = vec4(0.5);
+}
diff --git a/tests/spec/glsl-1.10/compiler/if-boolean-scalar-check.frag b/tests/spec/glsl-1.10/compiler/if-boolean-scalar-check.frag
new file mode 100644
index 0000000..e506b7a
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/if-boolean-scalar-check.frag
@@ -0,0 +1,13 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void main()
+{
+	vec3 v;
+	if (v) {
+	}
+	gl_FragColor = vec4(0.5);
+}
diff --git a/tests/spec/glsl-1.10/compiler/illegal-assignment.frag b/tests/spec/glsl-1.10/compiler/illegal-assignment.frag
new file mode 100644
index 0000000..ced7d05
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/illegal-assignment.frag
@@ -0,0 +1,11 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void main()
+{
+	float x = main;
+	gl_FragColor = vec4(0.5);
+}
diff --git a/tests/spec/glsl-1.10/compiler/main-without-return-type.frag b/tests/spec/glsl-1.10/compiler/main-without-return-type.frag
new file mode 100644
index 0000000..6131f43
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/main-without-return-type.frag
@@ -0,0 +1,9 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+main() {
+	gl_FragColor = vec4(0.5);
+}
diff --git a/tests/spec/glsl-1.10/compiler/two-immediate-float-constants-without-operator.frag b/tests/spec/glsl-1.10/compiler/two-immediate-float-constants-without-operator.frag
new file mode 100644
index 0000000..ad47993
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/two-immediate-float-constants-without-operator.frag
@@ -0,0 +1,11 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void main()
+{
+	float x = 1.0 2.0;
+	gl_FragColor = vec4(0.5);
+}
diff --git a/tests/spec/glsl-1.10/compiler/undefined-variable-in-selection-operator.frag b/tests/spec/glsl-1.10/compiler/undefined-variable-in-selection-operator.frag
new file mode 100644
index 0000000..c3f8ac5
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/undefined-variable-in-selection-operator.frag
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Test for bug in TIntermediate::addUnaryMath?
+ */
+
+void main()
+{
+	-vec4(x ? 1.0 : -1.0);
+}
diff --git a/tests/spec/glsl-1.10/compiler/undefined-variable.frag b/tests/spec/glsl-1.10/compiler/undefined-variable.frag
new file mode 100644
index 0000000..2b728ec
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/undefined-variable.frag
@@ -0,0 +1,11 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void main()
+{
+	vec3 v = u;
+	gl_FragColor = vec4(0.5);
+}
-- 
2.7.4



More information about the Piglit mailing list