Add several tests for vertex shader attributes
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 30 Mar 2010 00:19:13 +0000 (17:19 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 30 Mar 2010 00:19:13 +0000 (17:19 -0700)
tests/attribute-01.glsl [new file with mode: 0644]
tests/attribute-02.glsl [new file with mode: 0644]
tests/attribute-03.glsl [new file with mode: 0644]
tests/attribute-04.glsl [new file with mode: 0644]
tests/attribute-05.glsl [new file with mode: 0644]
tests/attribute-06.glsl [new file with mode: 0644]
tests/attribute-07.glsl [new file with mode: 0644]
tests/attribute-08.glsl [new file with mode: 0644]
tests/attribute-09.glsl [new file with mode: 0644]
tests/attribute-10.glsl [new file with mode: 0644]
tests/attribute-11.glsl [new file with mode: 0644]

diff --git a/tests/attribute-01.glsl b/tests/attribute-01.glsl
new file mode 100644 (file)
index 0000000..18e9e44
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have type int */
+attribute int i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-02.glsl b/tests/attribute-02.glsl
new file mode 100644 (file)
index 0000000..6b6df74
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have type ivec2 */
+attribute ivec2 i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-03.glsl b/tests/attribute-03.glsl
new file mode 100644 (file)
index 0000000..870de9e
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have type ivec3 */
+attribute ivec3 i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-04.glsl b/tests/attribute-04.glsl
new file mode 100644 (file)
index 0000000..14af2fc
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have type ivec4 */
+attribute ivec4 i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-05.glsl b/tests/attribute-05.glsl
new file mode 100644 (file)
index 0000000..18822c7
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have type bool */
+attribute bool i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-06.glsl b/tests/attribute-06.glsl
new file mode 100644 (file)
index 0000000..f18027b
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have type bvec2 */
+attribute bvec2 i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-07.glsl b/tests/attribute-07.glsl
new file mode 100644 (file)
index 0000000..0af13ba
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have type bvec3 */
+attribute bvec3 i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-08.glsl b/tests/attribute-08.glsl
new file mode 100644 (file)
index 0000000..b069c04
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have type bvec4 */
+attribute bvec4 i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-09.glsl b/tests/attribute-09.glsl
new file mode 100644 (file)
index 0000000..6a60724
--- /dev/null
@@ -0,0 +1,7 @@
+/* FAIL - attribute cannot have array type in GLSL 1.10 */
+attribute vec4 i[10];
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-10.glsl b/tests/attribute-10.glsl
new file mode 100644 (file)
index 0000000..6f5ef63
--- /dev/null
@@ -0,0 +1,8 @@
+#version 120
+/* FAIL - attribute cannot have array type in GLSL 1.20 */
+attribute vec4 i[10];
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
diff --git a/tests/attribute-11.glsl b/tests/attribute-11.glsl
new file mode 100644 (file)
index 0000000..c1e6901
--- /dev/null
@@ -0,0 +1,8 @@
+#version 130
+/* PASS */
+attribute vec4 i[10];
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}