summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-24 17:42:59 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-24 17:42:59 -0700
commite4fca97afd27f72d056e245aaa5761579ee78850 (patch)
treee151e5aecc9438a5ff1bf4f630829221de326d35
parent3209c4e3692eaa9468aadcd21ce402e6b0d5b7dd (diff)
Add some matrix math tests
-rw-r--r--tests/matrix-01.glsl6
-rw-r--r--tests/matrix-02.glsl6
-rw-r--r--tests/matrix-03.glsl6
-rw-r--r--tests/matrix-04.glsl6
-rw-r--r--tests/matrix-05.glsl6
-rw-r--r--tests/matrix-06.glsl6
-rw-r--r--tests/matrix-07.glsl27
-rw-r--r--tests/matrix-08.glsl19
8 files changed, 82 insertions, 0 deletions
diff --git a/tests/matrix-01.glsl b/tests/matrix-01.glsl
new file mode 100644
index 0000000000..f46416c8f6
--- /dev/null
+++ b/tests/matrix-01.glsl
@@ -0,0 +1,6 @@
+/* FAIL - non-square matrices are not available in GLSL 1.10 */
+
+void main()
+{
+ mat2x3 m;
+}
diff --git a/tests/matrix-02.glsl b/tests/matrix-02.glsl
new file mode 100644
index 0000000000..0630722b79
--- /dev/null
+++ b/tests/matrix-02.glsl
@@ -0,0 +1,6 @@
+/* FAIL - non-square matrices are not available in GLSL 1.10 */
+
+void main()
+{
+ mat2x4 m;
+}
diff --git a/tests/matrix-03.glsl b/tests/matrix-03.glsl
new file mode 100644
index 0000000000..925dc80625
--- /dev/null
+++ b/tests/matrix-03.glsl
@@ -0,0 +1,6 @@
+/* FAIL - non-square matrices are not available in GLSL 1.10 */
+
+void main()
+{
+ mat3x2 m;
+}
diff --git a/tests/matrix-04.glsl b/tests/matrix-04.glsl
new file mode 100644
index 0000000000..5275619b31
--- /dev/null
+++ b/tests/matrix-04.glsl
@@ -0,0 +1,6 @@
+/* FAIL - non-square matrices are not available in GLSL 1.10 */
+
+void main()
+{
+ mat3x4 m;
+}
diff --git a/tests/matrix-05.glsl b/tests/matrix-05.glsl
new file mode 100644
index 0000000000..74e1fd2514
--- /dev/null
+++ b/tests/matrix-05.glsl
@@ -0,0 +1,6 @@
+/* FAIL - non-square matrices are not available in GLSL 1.10 */
+
+void main()
+{
+ mat4x2 m;
+}
diff --git a/tests/matrix-06.glsl b/tests/matrix-06.glsl
new file mode 100644
index 0000000000..0a512b8523
--- /dev/null
+++ b/tests/matrix-06.glsl
@@ -0,0 +1,6 @@
+/* FAIL - non-square matrices are not available in GLSL 1.10 */
+
+void main()
+{
+ mat4x3 m;
+}
diff --git a/tests/matrix-07.glsl b/tests/matrix-07.glsl
new file mode 100644
index 0000000000..0b59aa69d5
--- /dev/null
+++ b/tests/matrix-07.glsl
@@ -0,0 +1,27 @@
+/* PASS */
+
+uniform mat2 a;
+uniform mat2 b;
+uniform mat2 c;
+uniform mat2 d;
+uniform mat3 e;
+uniform mat3 f;
+uniform mat3 g;
+uniform mat3 h;
+uniform mat4 i;
+uniform mat4 j;
+uniform mat4 k;
+uniform mat4 l;
+
+void main()
+{
+ mat2 x;
+ mat3 y;
+ mat4 z;
+
+ x = a * b + c / d;
+ y = e * f + g / h;
+ z = i * j + k / l;
+
+ gl_Position = gl_Vertex;
+}
diff --git a/tests/matrix-08.glsl b/tests/matrix-08.glsl
new file mode 100644
index 0000000000..38138d22de
--- /dev/null
+++ b/tests/matrix-08.glsl
@@ -0,0 +1,19 @@
+#version 120
+/* PASS */
+
+uniform mat2x3 a;
+uniform mat3x2 b;
+uniform mat3x3 c;
+uniform mat3x3 d;
+
+void main()
+{
+ mat3x3 x;
+
+ /* Multiplying a 2 column, 3 row matrix with a 3 column, 2 row matrix
+ * results in a 3 column, 3 row matrix.
+ */
+ x = (a * b) + c / d;
+
+ gl_Position = gl_Vertex;
+}