diff options
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform')
8 files changed, 182 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag new file mode 100644 index 0000000000..2c0fc9e2c6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag @@ -0,0 +1,24 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +uniform bool funi1; +uniform bvec2 funi2; +uniform bvec3 funi3; +uniform bvec4 funi4; +varying vec4 color; + +void main (void) +{ + vec4 temp = vec4(0.0, 0.0, 0.0, 0.0); + if(funi1 || funi2[0] && funi2[1] && funi3[0] && funi3[1] && funi3[2] || funi4[0] && funi4[1] && funi4[2] && funi4[3]) + temp = vec4(1.0, 0.0, 0.5, 1.0); + gl_FragColor = temp + color; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert new file mode 100644 index 0000000000..33bcf06a9b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert @@ -0,0 +1,22 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +uniform bool vuni1; +uniform bvec2 vuni2; +uniform bvec3 vuni3; +uniform bvec4 vuni4; +varying vec4 color; + +void main (void) +{ + if(vuni1 || vuni2[0] && vuni2[1] && vuni3[0] && vuni3[1] && vuni3[2] || vuni4[0] && vuni4[1] && vuni4[2] && vuni4[3]) + color = vec4(1.0, 0.0, 0.5, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag new file mode 100644 index 0000000000..4d0cabe58d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag @@ -0,0 +1,22 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +uniform int funi1; +uniform ivec2 funi2; +uniform ivec3 funi3; +uniform ivec4 funi4; +varying vec4 color; + +void main (void) +{ + vec4 temp = vec4(float(funi1), float(funi2[0] + funi2[1]), float(funi3[0] + funi3[1] + funi3[2]), float(funi4[0] + funi4[1] + funi4[2] + funi4[3])); + gl_FragColor = temp + color; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert new file mode 100644 index 0000000000..ce7159c386 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert @@ -0,0 +1,21 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +uniform int vuni1; +uniform ivec2 vuni2; +uniform ivec3 vuni3; +uniform ivec4 vuni4; +varying vec4 color; + +void main (void) +{ + color = vec4(float(vuni1), float(vuni2[0] + vuni2[1]), float(vuni3[0] + vuni3[1] + vuni3[2]), float(vuni4[0] + vuni4[1] + vuni4[2] + vuni4[3]) ); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag new file mode 100644 index 0000000000..f963f96f36 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag @@ -0,0 +1,25 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +uniform mat2 funi2; +uniform mat3 funi3; +uniform mat4 funi4; +varying vec4 color; + +void main (void) +{ + vec4 temp = vec4( funi2[0][0] + funi2[0][1] + funi2[1][0] + funi2[1][1], + + funi3[0][0] + funi3[0][1] + funi3[0][2] + funi3[1][0] + funi3[1][1] + funi3[1][2] + funi3[2][0] + funi3[2][1] + funi3[2][2], + + funi4[0][0] + funi4[0][1] + funi4[0][2] + funi4[0][3] + funi4[1][0] + funi4[1][1] + funi4[1][2] + funi4[1][3] + funi4[2][0] + funi4[2][1] + funi4[2][2] + funi4[2][3] + funi4[3][0] + funi4[3][1] + funi4[3][2] + funi4[3][3], 1.0 ); + gl_FragColor = temp + color; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert new file mode 100644 index 0000000000..9479dc919b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert @@ -0,0 +1,25 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +uniform mat2 vuni2; +uniform mat3 vuni3; +uniform mat4 vuni4; +varying vec4 color; + +void main (void) +{ + color = vec4( vuni2[0][0] + vuni2[0][1] + vuni2[1][0] + vuni2[1][1], + + vuni3[0][0] + vuni3[0][1] + vuni3[0][2] + vuni3[1][0] + vuni3[1][1] + vuni3[1][2] + vuni3[2][0] + vuni3[2][1] + vuni3[2][2], + + vuni4[0][0] + vuni4[0][1] + vuni4[0][2] + vuni4[0][3] + vuni4[1][0] + vuni4[1][1] + vuni4[1][2] + vuni4[1][3] + vuni4[2][0] + vuni4[2][1] + vuni4[2][2] + vuni4[2][3] + vuni4[3][0] + vuni4[3][1] + vuni4[3][2] + vuni4[3][3], 1.0 ); + + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag new file mode 100644 index 0000000000..18f3e349a4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag @@ -0,0 +1,22 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +uniform float funi1; +uniform vec2 funi2; +uniform vec3 funi3; +uniform vec4 funi4; +varying vec4 color; + +void main (void) +{ + vec4 temp = vec4(funi1, funi2[0] + funi2[1], funi3[0] + funi3[1] + funi3[2], funi4[0] + funi4[1] + funi4[2] + funi4[3]); + gl_FragColor = temp + color; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert new file mode 100644 index 0000000000..25f96f4464 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert @@ -0,0 +1,21 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +uniform float vuni1; +uniform vec2 vuni2; +uniform vec3 vuni3; +uniform vec4 vuni4; +varying vec4 color; + +void main (void) +{ + color = vec4(vuni1, vuni2[0] + vuni2[1], vuni3[0] + vuni3[1] + vuni3[2], vuni4[0] + vuni4[1] + vuni4[2] + vuni4[3]); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +}
\ No newline at end of file |