From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../ogles/GL/mat/array_const_mat2_frag.frag | 33 +++ .../ogles/GL/mat/array_const_mat2_vert.vert | 33 +++ .../ogles/GL/mat/array_const_mat3_frag.frag | 37 ++++ .../ogles/GL/mat/array_const_mat3_vert.vert | 37 ++++ .../ogles/GL/mat/array_const_mat4_frag.frag | 39 ++++ .../ogles/GL/mat/array_const_mat4_vert.vert | 39 ++++ .../ogles/GL/mat/const_mat2_copy_frag.frag | 56 +++++ .../ogles/GL/mat/const_mat2_copy_vert.vert | 55 +++++ .../conformance/ogles/GL/mat/const_mat2_frag.frag | 53 +++++ .../conformance/ogles/GL/mat/const_mat2_vert.vert | 52 +++++ .../ogles/GL/mat/const_mat3_copy_frag.frag | 66 ++++++ .../ogles/GL/mat/const_mat3_copy_vert.vert | 66 ++++++ .../conformance/ogles/GL/mat/const_mat3_frag.frag | 63 ++++++ .../conformance/ogles/GL/mat/const_mat3_vert.vert | 62 ++++++ .../ogles/GL/mat/const_mat4_copy_frag.frag | 78 +++++++ .../ogles/GL/mat/const_mat4_copy_vert.vert | 77 +++++++ .../conformance/ogles/GL/mat/const_mat4_frag.frag | 75 +++++++ .../conformance/ogles/GL/mat/const_mat4_vert.vert | 74 +++++++ .../conformance/ogles/GL/mat/input.run.txt | 7 + .../conformance/ogles/GL/mat/mat2_2vec2_frag.frag | 26 +++ .../conformance/ogles/GL/mat/mat2_2vec2_vert.vert | 28 +++ .../conformance/ogles/GL/mat/mat2_4float_frag.frag | 26 +++ .../conformance/ogles/GL/mat/mat2_4float_vert.vert | 28 +++ .../conformance/ogles/GL/mat/mat2_copy_frag.frag | 56 +++++ .../conformance/ogles/GL/mat/mat2_copy_vert.vert | 55 +++++ .../conformance/ogles/GL/mat/mat2_float_frag.frag | 31 +++ .../conformance/ogles/GL/mat/mat2_float_vert.vert | 30 +++ .../conformance/ogles/GL/mat/mat2_frag.frag | 53 +++++ .../conformance/ogles/GL/mat/mat2_vert.vert | 52 +++++ .../conformance/ogles/GL/mat/mat3_3vec3_frag.frag | 31 +++ .../conformance/ogles/GL/mat/mat3_3vec3_vert.vert | 32 +++ .../conformance/ogles/GL/mat/mat3_9float_frag.frag | 31 +++ .../conformance/ogles/GL/mat/mat3_9float_vert.vert | 33 +++ .../conformance/ogles/GL/mat/mat3_copy_frag.frag | 66 ++++++ .../conformance/ogles/GL/mat/mat3_copy_vert.vert | 65 ++++++ .../conformance/ogles/GL/mat/mat3_float_frag.frag | 42 ++++ .../conformance/ogles/GL/mat/mat3_float_vert.vert | 42 ++++ .../conformance/ogles/GL/mat/mat3_frag.frag | 63 ++++++ .../conformance/ogles/GL/mat/mat3_vert.vert | 62 ++++++ .../ogles/GL/mat/mat4_16float_frag.frag | 57 +++++ .../ogles/GL/mat/mat4_16float_vert.vert | 54 +++++ .../conformance/ogles/GL/mat/mat4_4vec4_frag.frag | 59 ++++++ .../conformance/ogles/GL/mat/mat4_4vec4_vert.vert | 56 +++++ .../conformance/ogles/GL/mat/mat4_copy_frag.frag | 78 +++++++ .../conformance/ogles/GL/mat/mat4_copy_vert.vert | 77 +++++++ .../conformance/ogles/GL/mat/mat4_frag.frag | 75 +++++++ .../conformance/ogles/GL/mat/mat4_vert.vert | 74 +++++++ .../conformance/ogles/GL/mat/mat_001_to_008.html | 231 +++++++++++++++++++++ .../conformance/ogles/GL/mat/mat_009_to_016.html | 231 +++++++++++++++++++++ .../conformance/ogles/GL/mat/mat_017_to_024.html | 231 +++++++++++++++++++++ .../conformance/ogles/GL/mat/mat_025_to_032.html | 231 +++++++++++++++++++++ .../conformance/ogles/GL/mat/mat_033_to_040.html | 231 +++++++++++++++++++++ .../conformance/ogles/GL/mat/mat_041_to_046.html | 181 ++++++++++++++++ 53 files changed, 3720 insertions(+) create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat2_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat2_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat3_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat3_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat4_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat4_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_copy_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_copy_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_copy_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_copy_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_copy_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_copy_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/input.run.txt create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_2vec2_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_2vec2_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_4float_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_4float_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_copy_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_copy_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_float_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_float_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_3vec3_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_3vec3_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_9float_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_9float_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_copy_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_copy_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_float_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_float_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_16float_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_16float_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_4vec4_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_4vec4_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_copy_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_copy_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_frag.frag create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_vert.vert create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_001_to_008.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_009_to_016.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_017_to_024.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_025_to_032.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_033_to_040.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_041_to_046.html (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat') diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat2_frag.frag new file mode 100644 index 0000000000..46ea31cf8f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat2_frag.frag @@ -0,0 +1,33 @@ + +/* +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 +varying vec4 color; + +const int array_size = 2; + +void main (void) +{ + const mat2 a = mat2(1.0, 2.0, 3.0, 4.0); + const mat2 b = mat2(5.0, 6.0, 7.0, 8.0); + mat2 array[array_size]; + float gray; + + array[0] = a; + array[1] = b; + + if((array[0] == a) && (array[1] == b)) + gray = 1.0; + else + gray = 0.0; + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat2_vert.vert new file mode 100644 index 0000000000..83845e66ac --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat2_vert.vert @@ -0,0 +1,33 @@ + +/* +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; +varying vec4 color; + +const int array_size = 2; + +void main (void) +{ + const mat2 a = mat2(1.0, 2.0, 3.0, 4.0); + const mat2 b = mat2(5.0, 6.0, 7.0, 8.0); + mat2 array[array_size]; + float gray; + + array[0] = a; + array[1] = b; + + if((array[0] == a) && (array[1] == b)) + gray = 1.0; + else + gray = 0.0; + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat3_frag.frag new file mode 100644 index 0000000000..1d0cdf2824 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat3_frag.frag @@ -0,0 +1,37 @@ + +/* +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 +varying vec4 color; + +const int array_size = 2; + +void main (void) +{ + const mat3 a = mat3(1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, + 7.0, 8.0, 9.0); + const mat3 b = mat3(10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, + 16.0, 17.0, 18.0); + mat3 array[array_size]; + float gray; + + array[0] = a; + array[1] = b; + + if((array[0] == a) && (array[1] == b)) + gray = 1.0; + else + gray = 0.0; + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat3_vert.vert new file mode 100644 index 0000000000..a0237d63c8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat3_vert.vert @@ -0,0 +1,37 @@ + +/* +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; +varying vec4 color; + +const int array_size = 2; + +void main (void) +{ + const mat3 a = mat3(1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, + 7.0, 8.0, 9.0); + const mat3 b = mat3(10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, + 16.0, 17.0, 18.0); + mat3 array[array_size]; + float gray; + + array[0] = a; + array[1] = b; + + if((array[0] == a) && (array[1] == b)) + gray = 1.0; + else + gray = 0.0; + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat4_frag.frag new file mode 100644 index 0000000000..28262c2fa0 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat4_frag.frag @@ -0,0 +1,39 @@ + +/* +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 +varying vec4 color; + +const int array_size = 2; + +void main (void) +{ + const mat4 a = mat4( 1.0, 2.0, 3.0, 4.0, + 5.0, 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, 16.0); + const mat4 b = mat4(17.0, 18.0, 19.0, 20.0, + 21.0, 22.0, 23.0, 24.0, + 25.0, 26.0, 27.0, 28.0, + 29.0, 30.0, 31.0, 32.0); + mat4 array[array_size]; + float gray; + + array[0] = a; + array[1] = b; + + if((array[0] == a) && (array[1] == b)) + gray = 1.0; + else + gray = 0.0; + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat4_vert.vert new file mode 100644 index 0000000000..ebc80931e8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/array_const_mat4_vert.vert @@ -0,0 +1,39 @@ + +/* +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; +varying vec4 color; + +const int array_size = 2; + +void main (void) +{ + const mat4 a = mat4( 1.0, 2.0, 3.0, 4.0, + 5.0, 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, 16.0); + const mat4 b = mat4(17.0, 18.0, 19.0, 20.0, + 21.0, 22.0, 23.0, 24.0, + 25.0, 26.0, 27.0, 28.0, + 29.0, 30.0, 31.0, 32.0); + mat4 array[array_size]; + float gray; + + array[0] = a; + array[1] = b; + + if((array[0] == a) && (array[1] == b)) + gray = 1.0; + else + gray = 0.0; + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_copy_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_copy_frag.frag new file mode 100644 index 0000000000..1f88596733 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_copy_frag.frag @@ -0,0 +1,56 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a constant 2 by 2 matrix with unique elements. + const mat2 a = mat2(1.0, 2.0, // 1.0 4.0 + 4.0, 8.0); // 2.0 8.0 + + // Copy the constant matrix to another non-const matrix. + mat2 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[1][0] != 4.0) elms = false; + if(b[1][1] != 8.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0]; + if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false; + x = b[0][1] + b[1][1]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1]; + if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false; + x = b[1][0] + b[1][1]; + if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_copy_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_copy_vert.vert new file mode 100644 index 0000000000..1a87e5e4f2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_copy_vert.vert @@ -0,0 +1,55 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a constant 2 by 2 matrix with unique elements. + const mat2 a = mat2(1.0, 2.0, // 1.0 4.0 + 4.0, 8.0); // 2.0 8.0 + + // Copy the constant matrix to another non-const matrix. + mat2 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[1][0] != 4.0) elms = false; + if(b[1][1] != 8.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0]; + if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false; + x = b[0][1] + b[1][1]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1]; + if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false; + x = b[1][0] + b[1][1]; + if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_frag.frag new file mode 100644 index 0000000000..d827f2a666 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_frag.frag @@ -0,0 +1,53 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a constant 2 by 2 matrix with unique elements. + const mat2 a = mat2(1.0, 2.0, // 1.0 4.0 + 4.0, 8.0); // 2.0 8.0 + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[1][0] != 4.0) elms = false; + if(a[1][1] != 8.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0]; + if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false; + x = a[0][1] + a[1][1]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1]; + if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false; + x = a[1][0] + a[1][1]; + if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_vert.vert new file mode 100644 index 0000000000..4a68460ed2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat2_vert.vert @@ -0,0 +1,52 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a constant 2 by 2 matrix with unique elements. + const mat2 a = mat2(1.0, 2.0, // 1.0 4.0 + 4.0, 8.0); // 2.0 8.0 + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[1][0] != 4.0) elms = false; + if(a[1][1] != 8.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0]; + if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false; + x = a[0][1] + a[1][1]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1]; + if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false; + x = a[1][0] + a[1][1]; + if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_copy_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_copy_frag.frag new file mode 100644 index 0000000000..68764145ac --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_copy_frag.frag @@ -0,0 +1,66 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a constant 3 by 3 matrix with unique elements. + const mat3 a = mat3( 1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, + 7.0, 8.0, 9.0); + + // Copy the constant matrix to another non-const matrix. + mat3 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[0][2] != 3.0) elms = false; + if(b[1][0] != 4.0) elms = false; + if(b[1][1] != 5.0) elms = false; + if(b[1][2] != 6.0) elms = false; + if(b[2][0] != 7.0) elms = false; + if(b[2][1] != 8.0) elms = false; + if(b[2][2] != 9.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0] + b[2][0]; + if( x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON ) rows = false; + x = b[0][1] + b[1][1] + b[2][1]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON ) rows = false; + x = b[0][2] + b[1][2] + b[2][2]; + if(x < 18.0-ERROR_EPSILON || x > 18.0+ERROR_EPSILON ) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1] + b[0][2]; + if( x < 6.0-ERROR_EPSILON || x > 6.0+ERROR_EPSILON ) cols = false; + x = b[1][0] + b[1][1] + b[1][2]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false; + x = b[2][0] + b[2][1] + b[2][2]; + if(x < 24.0-ERROR_EPSILON || x > 24.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_copy_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_copy_vert.vert new file mode 100644 index 0000000000..c4b5dbc84d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_copy_vert.vert @@ -0,0 +1,66 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a constant 3 by 3 matrix with unique elements. + const mat3 a = mat3( 1.0, 2.0, 4.0, // 1.0 8.0 64.0 + 8.0, 16.0, 32.0, // 2.0 16.0 128.0 + 64.0, 128.0, 256.0); // 4.0 32.0 256.0 + + // Copy the constant matrix to another non-const matrix. + mat3 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[0][2] != 4.0) elms = false; + if(b[1][0] != 8.0) elms = false; + if(b[1][1] != 16.0) elms = false; + if(b[1][2] != 32.0) elms = false; + if(b[2][0] != 64.0) elms = false; + if(b[2][1] != 128.0) elms = false; + if(b[2][2] != 256.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0] + b[2][0]; + x = b[0][0] + b[1][0] + b[2][0]; + if( x < 73.0-ERROR_EPSILON || x > 73.0+ERROR_EPSILON ) rows = false; + x = b[0][1] + b[1][1] + b[2][1]; + if(x < 146.0-ERROR_EPSILON || x > 146.0+ERROR_EPSILON ) rows = false; + x = b[0][2] + b[1][2] + b[2][2]; + if(x < 292.0-ERROR_EPSILON || x > 292.0+ERROR_EPSILON ) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1] + b[0][2]; + if( x < 7.0-ERROR_EPSILON || x > 7.0+ERROR_EPSILON ) cols = false; + x = b[1][0] + b[1][1] + b[1][2]; + if(x < 56.0-ERROR_EPSILON || x > 56.0+ERROR_EPSILON) cols = false; + x = b[2][0] + b[2][1] + b[2][2]; + if(x < 448.0-ERROR_EPSILON || x > 448.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_frag.frag new file mode 100644 index 0000000000..605dc39298 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_frag.frag @@ -0,0 +1,63 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a constant 3 by 3 matrix with unique elements. + const mat3 a = mat3( 1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, + 7.0, 8.0, 9.0); + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[0][2] != 3.0) elms = false; + if(a[1][0] != 4.0) elms = false; + if(a[1][1] != 5.0) elms = false; + if(a[1][2] != 6.0) elms = false; + if(a[2][0] != 7.0) elms = false; + if(a[2][1] != 8.0) elms = false; + if(a[2][2] != 9.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0] + a[2][0]; + if( x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON ) rows = false; + x = a[0][1] + a[1][1] + a[2][1]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON ) rows = false; + x = a[0][2] + a[1][2] + a[2][2]; + if(x < 18.0-ERROR_EPSILON || x > 18.0+ERROR_EPSILON ) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1] + a[0][2]; + if( x < 6.0-ERROR_EPSILON || x > 6.0+ERROR_EPSILON ) cols = false; + x = a[1][0] + a[1][1] + a[1][2]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false; + x = a[2][0] + a[2][1] + a[2][2]; + if(x < 24.0-ERROR_EPSILON || x > 24.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_vert.vert new file mode 100644 index 0000000000..5b66a4ff24 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat3_vert.vert @@ -0,0 +1,62 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a constant 3 by 3 matrix with unique elements. + const mat3 a = mat3( 1.0, 2.0, 4.0, // 1.0 8.0 64.0 + 8.0, 16.0, 32.0, // 2.0 16.0 128.0 + 64.0, 128.0, 256.0); // 4.0 32.0 256.0 + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[0][2] != 4.0) elms = false; + if(a[1][0] != 8.0) elms = false; + if(a[1][1] != 16.0) elms = false; + if(a[1][2] != 32.0) elms = false; + if(a[2][0] != 64.0) elms = false; + if(a[2][1] != 128.0) elms = false; + if(a[2][2] != 256.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0] + a[2][0]; + if( x < 73.0-ERROR_EPSILON || x > 73.0+ERROR_EPSILON ) rows = false; + x = a[0][1] + a[1][1] + a[2][1]; + if(x < 146.0-ERROR_EPSILON || x > 146.0+ERROR_EPSILON ) rows = false; + x = a[0][2] + a[1][2] + a[2][2]; + if(x < 292.0-ERROR_EPSILON || x > 292.0+ERROR_EPSILON ) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1] + a[0][2]; + if( x < 7.0-ERROR_EPSILON || x > 7.0+ERROR_EPSILON ) cols = false; + x = a[1][0] + a[1][1] + a[1][2]; + if(x < 56.0-ERROR_EPSILON || x > 56.0+ERROR_EPSILON) cols = false; + x = a[2][0] + a[2][1] + a[2][2]; + if(x < 448.0-ERROR_EPSILON || x > 448.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_copy_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_copy_frag.frag new file mode 100644 index 0000000000..c9fc9222a6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_copy_frag.frag @@ -0,0 +1,78 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a constant 4 by 4 matrix with unique elements. + const mat4 a = mat4( 1.0, 2.0, 3.0, 4.0, + 5.0, 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, 16.0); + + // Copy the constant matrix to another non-const matrix. + mat4 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[0][2] != 3.0) elms = false; + if(b[0][3] != 4.0) elms = false; + if(b[1][0] != 5.0) elms = false; + if(b[1][1] != 6.0) elms = false; + if(b[1][2] != 7.0) elms = false; + if(b[1][3] != 8.0) elms = false; + if(b[2][0] != 9.0) elms = false; + if(b[2][1] != 10.0) elms = false; + if(b[2][2] != 11.0) elms = false; + if(b[2][3] != 12.0) elms = false; + if(b[3][0] != 13.0) elms = false; + if(b[3][1] != 14.0) elms = false; + if(b[3][2] != 15.0) elms = false; + if(b[3][3] != 16.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0] + b[2][0] + b[3][0]; + if(x < 28.0-ERROR_EPSILON || x > 28.0+ERROR_EPSILON) rows = false; + x = b[0][1] + b[1][1] + b[2][1] + b[3][1]; + if(x < 32.0-ERROR_EPSILON || x > 32.0+ERROR_EPSILON) rows = false; + x = b[0][2] + b[1][2] + b[2][2] + b[3][2]; + if(x < 36.0-ERROR_EPSILON || x > 36.0+ERROR_EPSILON) rows = false; + x = b[0][3] + b[1][3] + b[2][3] + b[3][3]; + if(x < 40.0-ERROR_EPSILON || x > 40.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1] + b[0][2] + b[0][3]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) cols = false; + x = b[1][0] + b[1][1] + b[1][2] + b[1][3]; + if(x < 26.0-ERROR_EPSILON || x > 26.0+ERROR_EPSILON) cols = false; + x = b[2][0] + b[2][1] + b[2][2] + b[2][3]; + if(x < 42.0-ERROR_EPSILON || x > 42.0+ERROR_EPSILON) cols = false; + x = b[3][0] + b[3][1] + b[3][2] + b[3][3]; + if(x < 58.0-ERROR_EPSILON || x > 58.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_copy_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_copy_vert.vert new file mode 100644 index 0000000000..083f626b8d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_copy_vert.vert @@ -0,0 +1,77 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a constant 4 by 4 matrix with unique elements. + const mat4 a = mat4( 1.0, 2.0, 4.0, 8.0, // 1.0 16.0 256.0 4096.0 + 16.0, 32.0, 64.0, 128.0, // 2.0 32.0 512.0 8192.0 + 256.0, 512.0, 1024.0, 2048.0, // 4.0 64.0 1024.0 16384.0 + 4096.0, 8192.0, 16384.0, 32768.0); // 8.0 128.0 2048.0 32768.0 + + // Copy the constant matrix to another non-const matrix. + mat4 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[0][2] != 4.0) elms = false; + if(b[0][3] != 8.0) elms = false; + if(b[1][0] != 16.0) elms = false; + if(b[1][1] != 32.0) elms = false; + if(b[1][2] != 64.0) elms = false; + if(b[1][3] != 128.0) elms = false; + if(b[2][0] != 256.0) elms = false; + if(b[2][1] != 512.0) elms = false; + if(b[2][2] != 1024.0) elms = false; + if(b[2][3] != 2048.0) elms = false; + if(b[3][0] != 4096.0) elms = false; + if(b[3][1] != 8192.0) elms = false; + if(b[3][2] != 16384.0) elms = false; + if(b[3][3] != 32768.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0] + b[2][0] + b[3][0]; + if(x < 4369.0-ERROR_EPSILON || x > 4369.0+ERROR_EPSILON) rows = false; + x = b[0][1] + b[1][1] + b[2][1] + b[3][1]; + if(x < 8738.0-ERROR_EPSILON || x > 8738.0+ERROR_EPSILON) rows = false; + x = b[0][2] + b[1][2] + b[2][2] + b[3][2]; + if(x < 17476.0-ERROR_EPSILON || x > 17476.0+ERROR_EPSILON) rows = false; + x = b[0][3] + b[1][3] + b[2][3] + b[3][3]; + if(x < 34952.0-ERROR_EPSILON || x > 34952.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1] + b[0][2] + b[0][3]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false; + x = b[1][0] + b[1][1] + b[1][2] + b[1][3]; + if(x < 240.0-ERROR_EPSILON || x > 240.0+ERROR_EPSILON) cols = false; + x = b[2][0] + b[2][1] + b[2][2] + b[2][3]; + if(x < 3840.0-ERROR_EPSILON || x > 3840.0+ERROR_EPSILON) cols = false; + x = b[3][0] + b[3][1] + b[3][2] + b[3][3]; + if(x < 61440.0-ERROR_EPSILON || x > 61440.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_frag.frag new file mode 100644 index 0000000000..bca12dbbed --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_frag.frag @@ -0,0 +1,75 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a constant 4 by 4 matrix with unique elements. + const mat4 a = mat4( 1.0, 2.0, 3.0, 4.0, + 5.0, 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, 16.0); + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[0][2] != 3.0) elms = false; + if(a[0][3] != 4.0) elms = false; + if(a[1][0] != 5.0) elms = false; + if(a[1][1] != 6.0) elms = false; + if(a[1][2] != 7.0) elms = false; + if(a[1][3] != 8.0) elms = false; + if(a[2][0] != 9.0) elms = false; + if(a[2][1] != 10.0) elms = false; + if(a[2][2] != 11.0) elms = false; + if(a[2][3] != 12.0) elms = false; + if(a[3][0] != 13.0) elms = false; + if(a[3][1] != 14.0) elms = false; + if(a[3][2] != 15.0) elms = false; + if(a[3][3] != 16.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0] + a[2][0] + a[3][0]; + if(x < 28.0-ERROR_EPSILON || x > 28.0+ERROR_EPSILON) rows = false; + x = a[0][1] + a[1][1] + a[2][1] + a[3][1]; + if(x < 32.0-ERROR_EPSILON || x > 32.0+ERROR_EPSILON) rows = false; + x = a[0][2] + a[1][2] + a[2][2] + a[3][2]; + if(x < 36.0-ERROR_EPSILON || x > 36.0+ERROR_EPSILON) rows = false; + x = a[0][3] + a[1][3] + a[2][3] + a[3][3]; + if(x < 40.0-ERROR_EPSILON || x > 40.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = a[0][0] + a[0][1] + a[0][2] + a[0][3]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) cols = false; + x = a[1][0] + a[1][1] + a[1][2] + a[1][3]; + if(x < 26.0-ERROR_EPSILON || x > 26.0+ERROR_EPSILON) cols = false; + x = a[2][0] + a[2][1] + a[2][2] + a[2][3]; + if(x < 42.0-ERROR_EPSILON || x > 42.0+ERROR_EPSILON) cols = false; + x = a[3][0] + a[3][1] + a[3][2] + a[3][3]; + if(x < 58.0-ERROR_EPSILON || x > 58.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_vert.vert new file mode 100644 index 0000000000..8010ab7752 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/const_mat4_vert.vert @@ -0,0 +1,74 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a constant 4 by 4 matrix with unique elements. + const mat4 a = mat4( 1.0, 2.0, 4.0, 8.0, // 1.0 16.0 256.0 4096.0 + 16.0, 32.0, 64.0, 128.0, // 2.0 32.0 512.0 8192.0 + 256.0, 512.0, 1024.0, 2048.0, // 4.0 64.0 1024.0 16384.0 + 4096.0, 8192.0, 16384.0, 32768.0); // 8.0 128.0 2048.0 32768.0 + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[0][2] != 4.0) elms = false; + if(a[0][3] != 8.0) elms = false; + if(a[1][0] != 16.0) elms = false; + if(a[1][1] != 32.0) elms = false; + if(a[1][2] != 64.0) elms = false; + if(a[1][3] != 128.0) elms = false; + if(a[2][0] != 256.0) elms = false; + if(a[2][1] != 512.0) elms = false; + if(a[2][2] != 1024.0) elms = false; + if(a[2][3] != 2048.0) elms = false; + if(a[3][0] != 4096.0) elms = false; + if(a[3][1] != 8192.0) elms = false; + if(a[3][2] != 16384.0) elms = false; + if(a[3][3] != 32768.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0] + a[2][0] + a[3][0]; + if(x < 4369.0-ERROR_EPSILON || x > 4369.0+ERROR_EPSILON) rows = false; + x = a[0][1] + a[1][1] + a[2][1] + a[3][1]; + if(x < 8738.0-ERROR_EPSILON || x > 8738.0+ERROR_EPSILON) rows = false; + x = a[0][2] + a[1][2] + a[2][2] + a[3][2]; + if(x < 17476.0-ERROR_EPSILON || x > 17476.0+ERROR_EPSILON) rows = false; + x = a[0][3] + a[1][3] + a[2][3] + a[3][3]; + if(x < 34952.0-ERROR_EPSILON || x > 34952.0+ERROR_EPSILON) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1] + a[0][2] + a[0][3]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false; + x = a[1][0] + a[1][1] + a[1][2] + a[1][3]; + if(x < 240.0-ERROR_EPSILON || x > 240.0+ERROR_EPSILON) cols = false; + x = a[2][0] + a[2][1] + a[2][2] + a[2][3]; + if(x < 3840.0-ERROR_EPSILON || x > 3840.0+ERROR_EPSILON) cols = false; + x = a[3][0] + a[3][1] + a[3][2] + a[3][3]; + if(x < 61440.0-ERROR_EPSILON || x > 61440.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/input.run.txt new file mode 100644 index 0000000000..730999d88d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/input.run.txt @@ -0,0 +1,7 @@ +# this file is auto-generated. DO NOT EDIT. +mat_001_to_008.html +mat_009_to_016.html +mat_017_to_024.html +mat_025_to_032.html +mat_033_to_040.html +mat_041_to_046.html diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_2vec2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_2vec2_frag.frag new file mode 100644 index 0000000000..a4c35d387d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_2vec2_frag.frag @@ -0,0 +1,26 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + mat2 m = mat2(color.rg, color.ba); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if(m[0][0] != color.r) result = black; + if(m[0][1] != color.g) result = black; + if(m[1][0] != color.b) result = black; + if(m[1][1] != color.a) result = black; + + gl_FragColor = result; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_2vec2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_2vec2_vert.vert new file mode 100644 index 0000000000..68bc1cc1b3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_2vec2_vert.vert @@ -0,0 +1,28 @@ + +/* +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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + mat2 m = mat2(gtf_Color.rg, gtf_Color.ba); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + + if(m[0][0] != gtf_Color.r) result = black; + if(m[0][1] != gtf_Color.g) result = black; + if(m[1][0] != gtf_Color.b) result = black; + if(m[1][1] != gtf_Color.a) result = black; + + color = result; + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_4float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_4float_frag.frag new file mode 100644 index 0000000000..d4d03d3a18 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_4float_frag.frag @@ -0,0 +1,26 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + mat2 m = mat2(color.r, color.g, color.b, color.a); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if(m[0][0] != color.r) result = black; + if(m[0][1] != color.g) result = black; + if(m[1][0] != color.b) result = black; + if(m[1][1] != color.a) result = black; + + gl_FragColor = result; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_4float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_4float_vert.vert new file mode 100644 index 0000000000..204511e73c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_4float_vert.vert @@ -0,0 +1,28 @@ + +/* +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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + mat2 m = mat2(gtf_Color.r, gtf_Color.g, gtf_Color.b, gtf_Color.a); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + + if(m[0][0] != gtf_Color.r) result = black; + if(m[0][1] != gtf_Color.g) result = black; + if(m[1][0] != gtf_Color.b) result = black; + if(m[1][1] != gtf_Color.a) result = black; + + color = result; + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_copy_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_copy_frag.frag new file mode 100644 index 0000000000..de941ae60c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_copy_frag.frag @@ -0,0 +1,56 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a 2 by 2 matrix with unique elements. + mat2 a = mat2(1.0, 2.0, // 1.0 4.0 + 4.0, 8.0); // 2.0 8.0 + + // Copy the matrix to another non-const matrix. + mat2 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[1][0] != 4.0) elms = false; + if(b[1][1] != 8.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0]; + if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false; + x = b[0][1] + b[1][1]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1]; + if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false; + x = b[1][0] + b[1][1]; + if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_copy_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_copy_vert.vert new file mode 100644 index 0000000000..7659358d4e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_copy_vert.vert @@ -0,0 +1,55 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a 2 by 2 matrix with unique elements. + mat2 a = mat2(1.0, 2.0, // 1.0 4.0 + 4.0, 8.0); // 2.0 8.0 + + // Copy the matrix to another non-const matrix. + mat2 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[1][0] != 4.0) elms = false; + if(b[1][1] != 8.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0]; + if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false; + x = b[0][1] + b[1][1]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1]; + if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false; + x = b[1][0] + b[1][1]; + if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_float_frag.frag new file mode 100644 index 0000000000..05630af9cb --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_float_frag.frag @@ -0,0 +1,31 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + mat2 m = mat2(0.5); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if((m[0][0] != 0.5)) + result = black; + if((m[0][1] != 0.0)) + result = black; + + if((m[1][0] != 0.0)) + result = black; + if((m[1][1] != 0.5)) + result = black; + + gl_FragColor = result; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_float_vert.vert new file mode 100644 index 0000000000..71ceb36970 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_float_vert.vert @@ -0,0 +1,30 @@ + +/* +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; +varying vec4 color; + +void main (void) +{ + mat2 m = mat2(0.5); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if((m[0][0] != 0.5)) + result = black; + if((m[0][1] != 0.0)) + result = black; + if((m[1][0] != 0.0)) + result = black; + if((m[1][1] != 0.5)) + result = black; + + color = result; + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_frag.frag new file mode 100644 index 0000000000..765949d942 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_frag.frag @@ -0,0 +1,53 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a 2 by 2 matrix with unique elements. + mat2 a = mat2(1.0, 2.0, // 1.0 4.0 + 4.0, 8.0); // 2.0 8.0 + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[1][0] != 4.0) elms = false; + if(a[1][1] != 8.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0]; + if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false; + x = a[0][1] + a[1][1]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1]; + if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false; + x = a[1][0] + a[1][1]; + if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_vert.vert new file mode 100644 index 0000000000..cb2b46fd2e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat2_vert.vert @@ -0,0 +1,52 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a 2 by 2 matrix with unique elements. + mat2 a = mat2(1.0, 2.0, // 1.0 4.0 + 4.0, 8.0); // 2.0 8.0 + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[1][0] != 4.0) elms = false; + if(a[1][1] != 8.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0]; + if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false; + x = a[0][1] + a[1][1]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1]; + if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false; + x = a[1][0] + a[1][1]; + if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_3vec3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_3vec3_frag.frag new file mode 100644 index 0000000000..b040e0b2e5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_3vec3_frag.frag @@ -0,0 +1,31 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + mat3 m = mat3(color.rgb, color.rgb, color.rgb); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if(m[0][0] != color.r) result = black; + if(m[0][1] != color.g) result = black; + if(m[0][2] != color.b) result = black; + if(m[1][0] != color.r) result = black; + if(m[1][1] != color.g) result = black; + if(m[1][2] != color.b) result = black; + if(m[2][0] != color.r) result = black; + if(m[2][1] != color.g) result = black; + if(m[2][2] != color.b) result = black; + + gl_FragColor = result; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_3vec3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_3vec3_vert.vert new file mode 100644 index 0000000000..c0e79d0c3b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_3vec3_vert.vert @@ -0,0 +1,32 @@ + +/* +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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + mat3 m = mat3(gtf_Color.rgb, gtf_Color.rgb, gtf_Color.rgb); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if(m[0][0] != gtf_Color.r) result = black; + if(m[0][1] != gtf_Color.g) result = black; + if(m[0][2] != gtf_Color.b) result = black; + if(m[1][0] != gtf_Color.r) result = black; + if(m[1][1] != gtf_Color.g) result = black; + if(m[1][2] != gtf_Color.b) result = black; + if(m[2][0] != gtf_Color.r) result = black; + if(m[2][1] != gtf_Color.g) result = black; + if(m[2][2] != gtf_Color.b) result = black; + + color = result; + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_9float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_9float_frag.frag new file mode 100644 index 0000000000..ac54f6162d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_9float_frag.frag @@ -0,0 +1,31 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + mat3 m = mat3(color.r, color.g, color.b, color.r, color.g, color.b, color.r, color.g, color.b); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if(m[0][0] != color.r) result = black; + if(m[0][1] != color.g) result = black; + if(m[0][2] != color.b) result = black; + if(m[1][0] != color.r) result = black; + if(m[1][1] != color.g) result = black; + if(m[1][2] != color.b) result = black; + if(m[2][0] != color.r) result = black; + if(m[2][1] != color.g) result = black; + if(m[2][2] != color.b) result = black; + + gl_FragColor = result; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_9float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_9float_vert.vert new file mode 100644 index 0000000000..1752e5799d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_9float_vert.vert @@ -0,0 +1,33 @@ + +/* +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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + mat3 m = mat3(gtf_Color.r, gtf_Color.g, gtf_Color.b, gtf_Color.r, gtf_Color.g, gtf_Color.b, gtf_Color.r, gtf_Color.g, gtf_Color.b); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + + if(m[0][0] != gtf_Color.r) result = black; + if(m[0][1] != gtf_Color.g) result = black; + if(m[0][2] != gtf_Color.b) result = black; + if(m[1][0] != gtf_Color.r) result = black; + if(m[1][1] != gtf_Color.g) result = black; + if(m[1][2] != gtf_Color.b) result = black; + if(m[2][0] != gtf_Color.r) result = black; + if(m[2][1] != gtf_Color.g) result = black; + if(m[2][2] != gtf_Color.b) result = black; + + color = result; + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_copy_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_copy_frag.frag new file mode 100644 index 0000000000..cead1e7a20 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_copy_frag.frag @@ -0,0 +1,66 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a 3 by 3 matrix with unique elements. + mat3 a = mat3( 1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, + 7.0, 8.0, 9.0); + + // Copy the matrix to another non-const matrix. + mat3 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[0][2] != 3.0) elms = false; + if(b[1][0] != 4.0) elms = false; + if(b[1][1] != 5.0) elms = false; + if(b[1][2] != 6.0) elms = false; + if(b[2][0] != 7.0) elms = false; + if(b[2][1] != 8.0) elms = false; + if(b[2][2] != 9.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0] + b[2][0]; + if( x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON ) rows = false; + x = b[0][1] + b[1][1] + b[2][1]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON ) rows = false; + x = b[0][2] + b[1][2] + b[2][2]; + if(x < 18.0-ERROR_EPSILON || x > 18.0+ERROR_EPSILON ) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1] + b[0][2]; + if( x < 6.0-ERROR_EPSILON || x > 6.0+ERROR_EPSILON ) cols = false; + x = b[1][0] + b[1][1] + b[1][2]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false; + x = b[2][0] + b[2][1] + b[2][2]; + if(x < 24.0-ERROR_EPSILON || x > 24.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_copy_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_copy_vert.vert new file mode 100644 index 0000000000..2432aba504 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_copy_vert.vert @@ -0,0 +1,65 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a 3 by 3 matrix with unique elements. + mat3 a = mat3( 1.0, 2.0, 4.0, // 1.0 8.0 64.0 + 8.0, 16.0, 32.0, // 2.0 16.0 128.0 + 64.0, 128.0, 256.0); // 4.0 32.0 256.0 + + // Copy the matrix to another non-const matrix. + mat3 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[0][2] != 4.0) elms = false; + if(b[1][0] != 8.0) elms = false; + if(b[1][1] != 16.0) elms = false; + if(b[1][2] != 32.0) elms = false; + if(b[2][0] != 64.0) elms = false; + if(b[2][1] != 128.0) elms = false; + if(b[2][2] != 256.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0] + b[2][0]; + if( x < 73.0-ERROR_EPSILON || x > 73.0+ERROR_EPSILON ) rows = false; + x = b[0][1] + b[1][1] + b[2][1]; + if(x < 146.0-ERROR_EPSILON || x > 146.0+ERROR_EPSILON ) rows = false; + x = b[0][2] + b[1][2] + b[2][2]; + if(x < 292.0-ERROR_EPSILON || x > 292.0+ERROR_EPSILON ) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1] + b[0][2]; + if( x < 7.0-ERROR_EPSILON || x > 7.0+ERROR_EPSILON ) cols = false; + x = b[1][0] + b[1][1] + b[1][2]; + if(x < 56.0-ERROR_EPSILON || x > 56.0+ERROR_EPSILON) cols = false; + x = b[2][0] + b[2][1] + b[2][2]; + if(x < 448.0-ERROR_EPSILON || x > 448.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_float_frag.frag new file mode 100644 index 0000000000..26d9662bc8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_float_frag.frag @@ -0,0 +1,42 @@ + +/* +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 +varying vec4 color; + +void main (void) +{ + mat3 m = mat3(0.5); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if((m[0][0] != 0.5)) + result = black; + if((m[0][1] != 0.0)) + result = black; + if((m[0][2] != 0.0)) + result = black; + + if((m[1][0] != 0.0)) + result = black; + if((m[1][1] != 0.5)) + result = black; + if((m[1][2] != 0.0)) + result = black; + + if((m[2][0] != 0.0)) + result = black; + if((m[2][1] != 0.0)) + result = black; + if((m[2][2] != 0.5)) + result = black; + + gl_FragColor = result; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_float_vert.vert new file mode 100644 index 0000000000..f3e846d1b7 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_float_vert.vert @@ -0,0 +1,42 @@ + +/* +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; +varying vec4 color; + +void main (void) +{ + mat3 m = mat3(0.5); + vec4 black = vec4(0.0, 0.0, 0.0, 1.0); + vec4 result = vec4(1.0, 1.0, 1.0, 1.0); + + if((m[0][0] != 0.5)) + result = black; + if((m[0][1] != 0.0)) + result = black; + if((m[0][2] != 0.0)) + result = black; + + if((m[1][0] != 0.0)) + result = black; + if((m[1][1] != 0.5)) + result = black; + if((m[1][2] != 0.0)) + result = black; + + if((m[2][0] != 0.0)) + result = black; + if((m[2][1] != 0.0)) + result = black; + if((m[2][2] != 0.5)) + result = black; + + color = result; + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_frag.frag new file mode 100644 index 0000000000..f7bc3e0b8f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_frag.frag @@ -0,0 +1,63 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a 3 by 3 matrix with unique elements. + mat3 a = mat3( 1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, + 7.0, 8.0, 9.0); + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[0][2] != 3.0) elms = false; + if(a[1][0] != 4.0) elms = false; + if(a[1][1] != 5.0) elms = false; + if(a[1][2] != 6.0) elms = false; + if(a[2][0] != 7.0) elms = false; + if(a[2][1] != 8.0) elms = false; + if(a[2][2] != 9.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0] + a[2][0]; + if( x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON ) rows = false; + x = a[0][1] + a[1][1] + a[2][1]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON ) rows = false; + x = a[0][2] + a[1][2] + a[2][2]; + if(x < 18.0-ERROR_EPSILON || x > 18.0+ERROR_EPSILON ) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = a[0][0] + a[0][1] + a[0][2]; + if( x < 6.0-ERROR_EPSILON || x > 6.0+ERROR_EPSILON ) cols = false; + x = a[1][0] + a[1][1] + a[1][2]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false; + x = a[2][0] + a[2][1] + a[2][2]; + if(x < 24.0-ERROR_EPSILON || x > 24.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_vert.vert new file mode 100644 index 0000000000..6fee73b959 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat3_vert.vert @@ -0,0 +1,62 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a 3 by 3 matrix with unique elements. + mat3 a = mat3( 1.0, 2.0, 4.0, // 1.0 8.0 64.0 + 8.0, 16.0, 32.0, // 2.0 16.0 128.0 + 64.0, 128.0, 256.0); // 4.0 32.0 256.0 + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[0][2] != 4.0) elms = false; + if(a[1][0] != 8.0) elms = false; + if(a[1][1] != 16.0) elms = false; + if(a[1][2] != 32.0) elms = false; + if(a[2][0] != 64.0) elms = false; + if(a[2][1] != 128.0) elms = false; + if(a[2][2] != 256.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0] + a[2][0]; + if( x < 73.0-ERROR_EPSILON || x > 73.0+ERROR_EPSILON ) rows = false; + x = a[0][1] + a[1][1] + a[2][1]; + if(x < 146.0-ERROR_EPSILON || x > 146.0+ERROR_EPSILON ) rows = false; + x = a[0][2] + a[1][2] + a[2][2]; + if(x < 292.0-ERROR_EPSILON || x > 292.0+ERROR_EPSILON ) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1] + a[0][2]; + if( x < 7.0-ERROR_EPSILON || x > 7.0+ERROR_EPSILON ) cols = false; + x = a[1][0] + a[1][1] + a[1][2]; + if(x < 56.0-ERROR_EPSILON || x > 56.0+ERROR_EPSILON) cols = false; + x = a[2][0] + a[2][1] + a[2][2]; + if(x < 448.0-ERROR_EPSILON || x > 448.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_16float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_16float_frag.frag new file mode 100644 index 0000000000..44a8076999 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_16float_frag.frag @@ -0,0 +1,57 @@ + +/* +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 +varying vec4 color; + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + mat4 a = mat4( 1.0, 2.0, 3.0, 4.0, + 5.0, 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, 16.0); + float gray,sum1=0.0,sum2=0.0,sum3=0.0,sum4=0.0; + int i; + + + sum1 += a[0][0]; + sum2 += a[1][0]; + sum3 += a[2][0]; + sum4 += a[3][0]; + + sum1 += a[0][1]; + sum2 += a[1][1]; + sum3 += a[2][1]; + sum4 += a[3][1]; + + sum1 += a[0][2]; + sum2 += a[1][2]; + sum3 += a[2][2]; + sum4 += a[3][2]; + + sum1 += a[0][3]; + sum2 += a[1][3]; + sum3 += a[2][3]; + sum4 += a[3][3]; + + if( ( sum1 > 10.0-ERROR_EPSILON && sum1 < 10.0+ERROR_EPSILON ) && + ( sum2 > 26.0-ERROR_EPSILON && sum2 < 26.0+ERROR_EPSILON) && + ( sum3 > 42.0-ERROR_EPSILON && sum3 < 42.0+ERROR_EPSILON) && + ( sum4 > 58.0-ERROR_EPSILON && sum4 < 58.0+ERROR_EPSILON) ) + gray=1.0; + else gray=0.0; + gl_FragColor = vec4(gray, gray, gray, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_16float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_16float_vert.vert new file mode 100644 index 0000000000..2e3622f679 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_16float_vert.vert @@ -0,0 +1,54 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + mat4 a = mat4(1.0, 2.0, 3.0, 4.0, + 5.0, 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, 16.0); + + float gray,sum1=0.0,sum2=0.0,sum3=0.0,sum4=0.0; + int i; + + sum1 = sum1 + a[0][0]; + sum2 = sum2 + a[1][0]; + sum3 = sum3 + a[2][0]; + sum4 = sum4 + a[3][0]; + + sum1 = sum1 + a[0][1]; + sum2 = sum2 + a[1][1]; + sum3 = sum3 + a[2][1]; + sum4 = sum4 + a[3][1]; + + sum1 = sum1 + a[0][2]; + sum2 = sum2 + a[1][2]; + sum3 = sum3 + a[2][2]; + sum4 = sum4 + a[3][2]; + + sum1 = sum1 + a[0][3]; + sum2 = sum2 + a[1][3]; + sum3 = sum3 + a[2][3]; + sum4 = sum4 + a[3][3]; + + if( ( sum1 > 10.0-ERROR_EPSILON && sum1 < 10.0+ERROR_EPSILON ) && + ( sum2 > 26.0-ERROR_EPSILON && sum2 < 26.0+ERROR_EPSILON) && + ( sum3 > 42.0-ERROR_EPSILON && sum3 < 42.0+ERROR_EPSILON) && + ( sum4 > 58.0-ERROR_EPSILON && sum4 < 58.0+ERROR_EPSILON) ) + gray=1.0; + else gray=0.0; + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_4vec4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_4vec4_frag.frag new file mode 100644 index 0000000000..053a5739b3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_4vec4_frag.frag @@ -0,0 +1,59 @@ + +/* +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 +varying vec4 color; + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + vec4 L1 = vec4(1.0, 2.0, 3.0, 4.0); + vec4 L2 = vec4(5.0, 6.0, 7.0, 8.0); + vec4 L3 = vec4(9.0, 10.0, 11.0, 12.0); + vec4 L4 = vec4(13.0, 14.0, 15.0, 16.0); + + mat4 a = mat4(L1,L2,L3,L4); + + float gray,sum1=0.0,sum2=0.0,sum3=0.0,sum4=0.0; + int i; + + sum1 = sum1 + a[0][0]; + sum2 = sum2 + a[1][0]; + sum3 = sum3 + a[2][0]; + sum4 = sum4 + a[3][0]; + + sum1 = sum1 + a[0][1]; + sum2 = sum2 + a[1][1]; + sum3 = sum3 + a[2][1]; + sum4 = sum4 + a[3][1]; + + sum1 = sum1 + a[0][2]; + sum2 = sum2 + a[1][2]; + sum3 = sum3 + a[2][2]; + sum4 = sum4 + a[3][2]; + + sum1 = sum1 + a[0][3]; + sum2 = sum2 + a[1][3]; + sum3 = sum3 + a[2][3]; + sum4 = sum4 + a[3][3]; + + if( ( sum1 > 10.0-ERROR_EPSILON && sum1 < 10.0+ERROR_EPSILON ) && + ( sum2 > 26.0-ERROR_EPSILON && sum2 < 26.0+ERROR_EPSILON) && + ( sum3 > 42.0-ERROR_EPSILON && sum3 < 42.0+ERROR_EPSILON) && + ( sum4 > 58.0-ERROR_EPSILON && sum4 < 58.0+ERROR_EPSILON) ) + gray=1.0; + else gray=0.0; + gl_FragColor = vec4(gray, gray, gray, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_4vec4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_4vec4_vert.vert new file mode 100644 index 0000000000..c238cdcd15 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_4vec4_vert.vert @@ -0,0 +1,56 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + vec4 L1 = vec4(1.0, 2.0, 3.0, 4.0); + vec4 L2 = vec4(5.0, 6.0, 7.0, 8.0); + vec4 L3 = vec4(9.0, 10.0, 11.0, 12.0); + vec4 L4 = vec4(13.0, 14.0, 15.0, 16.0); + + mat4 a = mat4(L1,L2,L3,L4); + + float gray,sum1=0.0,sum2=0.0,sum3=0.0,sum4=0.0; + int i; + + sum1 = sum1 + a[0][0]; + sum2 = sum2 + a[1][0]; + sum3 = sum3 + a[2][0]; + sum4 = sum4 + a[3][0]; + + sum1 = sum1 + a[0][1]; + sum2 = sum2 + a[1][1]; + sum3 = sum3 + a[2][1]; + sum4 = sum4 + a[3][1]; + + sum1 = sum1 + a[0][2]; + sum2 = sum2 + a[1][2]; + sum3 = sum3 + a[2][2]; + sum4 = sum4 + a[3][2]; + + sum1 = sum1 + a[0][3]; + sum2 = sum2 + a[1][3]; + sum3 = sum3 + a[2][3]; + sum4 = sum4 + a[3][3]; + + if( ( sum1 > 10.0-ERROR_EPSILON && sum1 < 10.0+ERROR_EPSILON ) && + ( sum2 > 26.0-ERROR_EPSILON && sum2 < 26.0+ERROR_EPSILON) && + ( sum3 > 42.0-ERROR_EPSILON && sum3 < 42.0+ERROR_EPSILON) && + ( sum4 > 58.0-ERROR_EPSILON && sum4 < 58.0+ERROR_EPSILON) ) + gray=1.0; + else gray=0.0; + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_copy_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_copy_frag.frag new file mode 100644 index 0000000000..b36313425f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_copy_frag.frag @@ -0,0 +1,78 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a constant 4 by 4 matrix with unique elements. + mat4 a = mat4( 1.0, 2.0, 3.0, 4.0, + 5.0, 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, 16.0); + + // Copy the matrix to another non-const matrix. + mat4 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[0][2] != 3.0) elms = false; + if(b[0][3] != 4.0) elms = false; + if(b[1][0] != 5.0) elms = false; + if(b[1][1] != 6.0) elms = false; + if(b[1][2] != 7.0) elms = false; + if(b[1][3] != 8.0) elms = false; + if(b[2][0] != 9.0) elms = false; + if(b[2][1] != 10.0) elms = false; + if(b[2][2] != 11.0) elms = false; + if(b[2][3] != 12.0) elms = false; + if(b[3][0] != 13.0) elms = false; + if(b[3][1] != 14.0) elms = false; + if(b[3][2] != 15.0) elms = false; + if(b[3][3] != 16.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0] + b[2][0] + b[3][0]; + if(x < 28.0-ERROR_EPSILON || x > 28.0+ERROR_EPSILON) rows = false; + x = b[0][1] + b[1][1] + b[2][1] + b[3][1]; + if(x < 32.0-ERROR_EPSILON || x > 32.0+ERROR_EPSILON) rows = false; + x = b[0][2] + b[1][2] + b[2][2] + b[3][2]; + if(x < 36.0-ERROR_EPSILON || x > 36.0+ERROR_EPSILON) rows = false; + x = b[0][3] + b[1][3] + b[2][3] + b[3][3]; + if(x < 40.0-ERROR_EPSILON || x > 40.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1] + b[0][2] + b[0][3]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) cols = false; + x = b[1][0] + b[1][1] + b[1][2] + b[1][3]; + if(x < 26.0-ERROR_EPSILON || x > 26.0+ERROR_EPSILON) cols = false; + x = b[2][0] + b[2][1] + b[2][2] + b[2][3]; + if(x < 42.0-ERROR_EPSILON || x > 42.0+ERROR_EPSILON) cols = false; + x = b[3][0] + b[3][1] + b[3][2] + b[3][3]; + if(x < 58.0-ERROR_EPSILON || x > 58.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_copy_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_copy_vert.vert new file mode 100644 index 0000000000..3c06f3258d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_copy_vert.vert @@ -0,0 +1,77 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a 4 by 4 matrix with unique elements. + mat4 a = mat4( 1.0, 2.0, 4.0, 8.0, // 1.0 16.0 256.0 4096.0 + 16.0, 32.0, 64.0, 128.0, // 2.0 32.0 512.0 8192.0 + 256.0, 512.0, 1024.0, 2048.0, // 4.0 64.0 1024.0 16384.0 + 4096.0, 8192.0, 16384.0, 32768.0); // 8.0 128.0 2048.0 32768.0 + + // Copy the matrix to another non-const matrix. + mat4 b = a; + + // Check each element of the copy. + bool elms = true; + if(b[0][0] != 1.0) elms = false; + if(b[0][1] != 2.0) elms = false; + if(b[0][2] != 4.0) elms = false; + if(b[0][3] != 8.0) elms = false; + if(b[1][0] != 16.0) elms = false; + if(b[1][1] != 32.0) elms = false; + if(b[1][2] != 64.0) elms = false; + if(b[1][3] != 128.0) elms = false; + if(b[2][0] != 256.0) elms = false; + if(b[2][1] != 512.0) elms = false; + if(b[2][2] != 1024.0) elms = false; + if(b[2][3] != 2048.0) elms = false; + if(b[3][0] != 4096.0) elms = false; + if(b[3][1] != 8192.0) elms = false; + if(b[3][2] != 16384.0) elms = false; + if(b[3][3] != 32768.0) elms = false; + + // Add up each row of the copy. + bool rows = true; + x = b[0][0] + b[1][0] + b[2][0] + b[3][0]; + if(x < 4369.0-ERROR_EPSILON || x > 4369.0+ERROR_EPSILON) rows = false; + x = b[0][1] + b[1][1] + b[2][1] + b[3][1]; + if(x < 8738.0-ERROR_EPSILON || x > 8738.0+ERROR_EPSILON) rows = false; + x = b[0][2] + b[1][2] + b[2][2] + b[3][2]; + if(x < 17476.0-ERROR_EPSILON || x > 17476.0+ERROR_EPSILON) rows = false; + x = b[0][3] + b[1][3] + b[2][3] + b[3][3]; + if(x < 34952.0-ERROR_EPSILON || x > 34952.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = b[0][0] + b[0][1] + b[0][2] + b[0][3]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false; + x = b[1][0] + b[1][1] + b[1][2] + b[1][3]; + if(x < 240.0-ERROR_EPSILON || x > 240.0+ERROR_EPSILON) cols = false; + x = b[2][0] + b[2][1] + b[2][2] + b[2][3]; + if(x < 3840.0-ERROR_EPSILON || x > 3840.0+ERROR_EPSILON) cols = false; + x = b[3][0] + b[3][1] + b[3][2] + b[3][3]; + if(x < 61440.0-ERROR_EPSILON || x > 61440.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_frag.frag new file mode 100644 index 0000000000..92c3f7c890 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_frag.frag @@ -0,0 +1,75 @@ + +/* +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 + +/* This epsilon will work as long as the magnitude of the float is < 128. + * This can be seen by taking the spec relative mediump precision of 2^-10: + * 0.125 / 2^-10 = 128 + */ +#define ERROR_EPSILON (0.125) + +void main (void) +{ + float x; + // Declare a 4 by 4 matrix with unique elements. + mat4 a = mat4( 1.0, 2.0, 3.0, 4.0, + 5.0, 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0, 12.0, + 13.0, 14.0, 15.0, 16.0); + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[0][2] != 3.0) elms = false; + if(a[0][3] != 4.0) elms = false; + if(a[1][0] != 5.0) elms = false; + if(a[1][1] != 6.0) elms = false; + if(a[1][2] != 7.0) elms = false; + if(a[1][3] != 8.0) elms = false; + if(a[2][0] != 9.0) elms = false; + if(a[2][1] != 10.0) elms = false; + if(a[2][2] != 11.0) elms = false; + if(a[2][3] != 12.0) elms = false; + if(a[3][0] != 13.0) elms = false; + if(a[3][1] != 14.0) elms = false; + if(a[3][2] != 15.0) elms = false; + if(a[3][3] != 16.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0] + a[2][0] + a[3][0]; + if(x < 28.0-ERROR_EPSILON || x > 28.0+ERROR_EPSILON) rows = false; + x = a[0][1] + a[1][1] + a[2][1] + a[3][1]; + if(x < 32.0-ERROR_EPSILON || x > 32.0+ERROR_EPSILON) rows = false; + x = a[0][2] + a[1][2] + a[2][2] + a[3][2]; + if(x < 36.0-ERROR_EPSILON || x > 36.0+ERROR_EPSILON) rows = false; + x = a[0][3] + a[1][3] + a[2][3] + a[3][3]; + if(x < 40.0-ERROR_EPSILON || x > 40.0+ERROR_EPSILON) rows = false; + + // Add up each column of the copy. + bool cols = true; + x = a[0][0] + a[0][1] + a[0][2] + a[0][3]; + if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) cols = false; + x = a[1][0] + a[1][1] + a[1][2] + a[1][3]; + if(x < 26.0-ERROR_EPSILON || x > 26.0+ERROR_EPSILON) cols = false; + x = a[2][0] + a[2][1] + a[2][2] + a[2][3]; + if(x < 42.0-ERROR_EPSILON || x > 42.0+ERROR_EPSILON) cols = false; + x = a[3][0] + a[3][1] + a[3][2] + a[3][3]; + if(x < 58.0-ERROR_EPSILON || x > 58.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the fragment color. + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_vert.vert new file mode 100644 index 0000000000..d0953158a6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat4_vert.vert @@ -0,0 +1,74 @@ + +/* +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; +varying vec4 color; + +#define ERROR_EPSILON 0.1 + +void main (void) +{ + float x; + // Declare a 4 by 4 matrix with unique elements. + mat4 a = mat4( 1.0, 2.0, 4.0, 8.0, // 1.0 16.0 256.0 4096.0 + 16.0, 32.0, 64.0, 128.0, // 2.0 32.0 512.0 8192.0 + 256.0, 512.0, 1024.0, 2048.0, // 4.0 64.0 1024.0 16384.0 + 4096.0, 8192.0, 16384.0, 32768.0); // 8.0 128.0 2048.0 32768.0 + + // Check each element. + bool elms = true; + if(a[0][0] != 1.0) elms = false; + if(a[0][1] != 2.0) elms = false; + if(a[0][2] != 4.0) elms = false; + if(a[0][3] != 8.0) elms = false; + if(a[1][0] != 16.0) elms = false; + if(a[1][1] != 32.0) elms = false; + if(a[1][2] != 64.0) elms = false; + if(a[1][3] != 128.0) elms = false; + if(a[2][0] != 256.0) elms = false; + if(a[2][1] != 512.0) elms = false; + if(a[2][2] != 1024.0) elms = false; + if(a[2][3] != 2048.0) elms = false; + if(a[3][0] != 4096.0) elms = false; + if(a[3][1] != 8192.0) elms = false; + if(a[3][2] != 16384.0) elms = false; + if(a[3][3] != 32768.0) elms = false; + + // Add up each row. + bool rows = true; + x = a[0][0] + a[1][0] + a[2][0] + a[3][0]; + if(x < 4369.0-ERROR_EPSILON || x > 4369.0+ERROR_EPSILON) rows = false; + x = a[0][1] + a[1][1] + a[2][1] + a[3][1]; + if(x < 8738.0-ERROR_EPSILON || x > 8738.0+ERROR_EPSILON) rows = false; + x = a[0][2] + a[1][2] + a[2][2] + a[3][2]; + if(x < 17476.0-ERROR_EPSILON || x > 17476.0+ERROR_EPSILON) rows = false; + x = a[0][3] + a[1][3] + a[2][3] + a[3][3]; + if(x < 34952.0-ERROR_EPSILON || x > 34952.0+ERROR_EPSILON) rows = false; + + // Add up each column. + bool cols = true; + x = a[0][0] + a[0][1] + a[0][2] + a[0][3]; + if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false; + x = a[1][0] + a[1][1] + a[1][2] + a[1][3]; + if(x < 240.0-ERROR_EPSILON || x > 240.0+ERROR_EPSILON) cols = false; + x = a[2][0] + a[2][1] + a[2][2] + a[2][3]; + if(x < 3840.0-ERROR_EPSILON || x > 3840.0+ERROR_EPSILON) cols = false; + x = a[3][0] + a[3][1] + a[3][2] + a[3][3]; + if(x < 61440.0-ERROR_EPSILON || x > 61440.0+ERROR_EPSILON) cols = false; + + // Check if all of the operations were successful. + float gray = elms && rows && cols ? 1.0 : 0.0; + + // Assign the varying variable color. + color = vec4(gray, gray, gray, 1.0); + + // Transform the vertex position. + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_001_to_008.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_001_to_008.html new file mode 100644 index 0000000000..e53b2780a0 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_001_to_008.html @@ -0,0 +1,231 @@ + + + + + + +WebGL GLSL conformance test: mat_001_to_008.html + + + + + + + + +
+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_009_to_016.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_009_to_016.html new file mode 100644 index 0000000000..0a3e5c1916 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_009_to_016.html @@ -0,0 +1,231 @@ + + + + + + +WebGL GLSL conformance test: mat_009_to_016.html + + + + + + + + +
+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_017_to_024.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_017_to_024.html new file mode 100644 index 0000000000..9f0ef60dd9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_017_to_024.html @@ -0,0 +1,231 @@ + + + + + + +WebGL GLSL conformance test: mat_017_to_024.html + + + + + + + + +
+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_025_to_032.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_025_to_032.html new file mode 100644 index 0000000000..58ac71f99a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_025_to_032.html @@ -0,0 +1,231 @@ + + + + + + +WebGL GLSL conformance test: mat_025_to_032.html + + + + + + + + +
+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_033_to_040.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_033_to_040.html new file mode 100644 index 0000000000..93245d25f1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_033_to_040.html @@ -0,0 +1,231 @@ + + + + + + +WebGL GLSL conformance test: mat_033_to_040.html + + + + + + + + +
+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_041_to_046.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_041_to_046.html new file mode 100644 index 0000000000..ddb93574a3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat/mat_041_to_046.html @@ -0,0 +1,181 @@ + + + + + + +WebGL GLSL conformance test: mat_041_to_046.html + + + + + + + + +
+
+ + + -- cgit v1.2.3