aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat3x2.shader_test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat3x2.shader_test')
-rw-r--r--tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat3x2.shader_test59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat3x2.shader_test b/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat3x2.shader_test
new file mode 100644
index 00000000..e7d332da
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat3x2.shader_test
@@ -0,0 +1,59 @@
+[require]
+GLSL >= 1.00 es
+GL >= 2.0 es
+# glUniformMatrix3x2fv only exists in OpenGL 2.1 or later.
+
+
+[vertex shader]
+attribute vec4 vertex;
+mat4 proj = mat4(
+ 2.0/250.0, 0.0, 0.0, -1.0,
+ 0.0, 2.0/250.0, 0.0, -1.0,
+ 0.0, 0.0, -1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0);
+
+uniform vec2 c;
+uniform vec3 r;
+uniform mat3x2 expected;
+varying vec4 color;
+
+void main() {
+ gl_Position = vertex;
+ gl_Position *= proj;
+ mat3x2 result = outerProduct(c, r);
+ color = (result == expected) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+}
+
+[fragment shader]
+
+varying vec4 color;
+void main() { gl_FragColor = color; }
+
+[test]
+clear color 0.5 0.5 0.5 0.0
+clear
+
+
+uniform vec2 c 2 3
+uniform vec3 r 4 5 6
+uniform mat3x2 expected 8 12 10 15 12 18
+draw rect 10 10 10 10
+probe rgb 15 15 0.0 1.0 0.0
+
+uniform vec2 c 3 4
+uniform vec3 r 5 6 7
+uniform mat3x2 expected 15 20 18 24 21 28
+draw rect 30 10 10 10
+probe rgb 35 15 0.0 1.0 0.0
+
+uniform vec2 c 4 5
+uniform vec3 r 6 7 8
+uniform mat3x2 expected 24 30 28 35 32 40
+draw rect 50 10 10 10
+probe rgb 55 15 0.0 1.0 0.0
+
+uniform vec2 c 5 6
+uniform vec3 r 7 8 9
+uniform mat3x2 expected 35 42 40 48 45 54
+draw rect 70 10 10 10
+probe rgb 75 15 0.0 1.0 0.0