summaryrefslogtreecommitdiff
path: root/tests/glslparsertest
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-12-10 14:46:01 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-12-10 14:47:51 -0800
commit8f89322d4b0b7ce0a1f40d6237607297a750f130 (patch)
treec058b23fe5fb4311217d200776547bfdda01cf2b /tests/glslparsertest
parent7b9b5f24e95dbca1293b54c061d018da880d4f2c (diff)
glslparsetest: Add more implicit conversion compile tests
These were created while trying to debug bugzilla #32287. They ultimately didn't help that debugging effort, but they do round out some of our implicit conversion coverage.
Diffstat (limited to 'tests/glslparsertest')
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-01.vert15
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-02.vert12
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-03.vert12
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-04.vert12
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-05.vert12
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-06.vert12
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-07.vert12
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-08.vert12
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-09.vert12
-rw-r--r--tests/glslparsertest/glsl2/implicit-conversion-10.vert12
10 files changed, 123 insertions, 0 deletions
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-01.vert b/tests/glslparsertest/glsl2/implicit-conversion-01.vert
new file mode 100644
index 00000000..137a30d3
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-01.vert
@@ -0,0 +1,15 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ float f = 8;
+ vec2 v2 = ivec2(1);
+ vec3 v3 = ivec3(1);
+ vec4 v4 = ivec4(1);
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-02.vert b/tests/glslparsertest/glsl2/implicit-conversion-02.vert
new file mode 100644
index 00000000..f8294874
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-02.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ float f = false;
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-03.vert b/tests/glslparsertest/glsl2/implicit-conversion-03.vert
new file mode 100644
index 00000000..a919abb9
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-03.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ int i = 1.2;
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-04.vert b/tests/glslparsertest/glsl2/implicit-conversion-04.vert
new file mode 100644
index 00000000..93592500
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-04.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ ivec2 i = vec2(1.2);
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-05.vert b/tests/glslparsertest/glsl2/implicit-conversion-05.vert
new file mode 100644
index 00000000..65bc834c
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-05.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ ivec3 i = vec3(1.2);
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-06.vert b/tests/glslparsertest/glsl2/implicit-conversion-06.vert
new file mode 100644
index 00000000..af2f1ff5
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-06.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ ivec4 i = vec4(1.2);
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-07.vert b/tests/glslparsertest/glsl2/implicit-conversion-07.vert
new file mode 100644
index 00000000..1e5a0d0a
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-07.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ int i = false;
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-08.vert b/tests/glslparsertest/glsl2/implicit-conversion-08.vert
new file mode 100644
index 00000000..5efc04f2
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-08.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ ivec2 i = bvec2(false);
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-09.vert b/tests/glslparsertest/glsl2/implicit-conversion-09.vert
new file mode 100644
index 00000000..0fa049a9
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-09.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ ivec3 i = bvec3(false);
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/tests/glslparsertest/glsl2/implicit-conversion-10.vert b/tests/glslparsertest/glsl2/implicit-conversion-10.vert
new file mode 100644
index 00000000..52b0e59a
--- /dev/null
+++ b/tests/glslparsertest/glsl2/implicit-conversion-10.vert
@@ -0,0 +1,12 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ */
+#version 120
+
+void main()
+{
+ ivec4 i = bvec4(false);
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}