diff options
Diffstat (limited to 'tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-const-mat2.shader_test')
-rw-r--r-- | tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-const-mat2.shader_test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-const-mat2.shader_test b/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-const-mat2.shader_test new file mode 100644 index 00000000..44434694 --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-const-mat2.shader_test @@ -0,0 +1,37 @@ +[require] +GLSL >= 1.00 es +GL >= 2.0 es + +[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); + + +const vec2 c = vec2(2, 3); +const vec2 r = vec2(4, 5); +uniform mat2 expected = mat2(8, 12, 10, 15); +varying vec4 color; + +void main() { + gl_Position = vertex; + gl_Position *= proj; + mat2 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 + + +draw rect 10 10 10 10 +probe rgb 15 15 0.0 1.0 0.0 |