From: Ian Romanick Date: Thu, 25 Mar 2010 00:42:59 +0000 (-0700) Subject: Add some matrix math tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4fca97afd27f72d056e245aaa5761579ee78850;p=mesa.git Add some matrix math tests --- diff --git a/tests/matrix-01.glsl b/tests/matrix-01.glsl new file mode 100644 index 00000000000..f46416c8f67 --- /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 00000000000..0630722b795 --- /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 00000000000..925dc806258 --- /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 00000000000..5275619b319 --- /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 00000000000..74e1fd25148 --- /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 00000000000..0a512b85234 --- /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 00000000000..0b59aa69d50 --- /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 00000000000..38138d22de4 --- /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; +}