diff options
Diffstat (limited to 'tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat4x4.shader_test')
-rw-r--r-- | tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat4x4.shader_test | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat4x4.shader_test b/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat4x4.shader_test new file mode 100644 index 00000000..fe146fac --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/1.20/vs-outerProduct-mat4x4.shader_test @@ -0,0 +1,57 @@ +[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); + +uniform vec4 c; +uniform vec4 r; +uniform mat4x4 expected; +varying vec4 color; + +void main() { + gl_Position = vertex; + gl_Position *= proj; + mat4x4 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 vec4 c 2 3 4 5 +uniform vec4 r 6 7 8 9 +uniform mat4x4 expected 12 18 24 30 14 21 28 35 16 24 32 40 18 27 36 45 +draw rect 10 10 10 10 +probe rgb 15 15 0.0 1.0 0.0 + +uniform vec4 c 3 4 5 6 +uniform vec4 r 7 8 9 10 +uniform mat4x4 expected 21 28 35 42 24 32 40 48 27 36 45 54 30 40 50 60 +draw rect 30 10 10 10 +probe rgb 35 15 0.0 1.0 0.0 + +uniform vec4 c 4 5 6 7 +uniform vec4 r 8 9 10 11 +uniform mat4x4 expected 32 40 48 56 36 45 54 63 40 50 60 70 44 55 66 77 +draw rect 50 10 10 10 +probe rgb 55 15 0.0 1.0 0.0 + +uniform vec4 c 5 6 7 8 +uniform vec4 r 9 10 11 12 +uniform mat4x4 expected 45 54 63 72 50 60 70 80 55 66 77 88 60 72 84 96 +draw rect 70 10 10 10 +probe rgb 75 15 0.0 1.0 0.0 |