diff options
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions')
143 files changed, 13520 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/array_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/array_float_frag.frag new file mode 100644 index 0000000000..a3f81289c9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/array_float_frag.frag @@ -0,0 +1,85 @@ + +/* +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 qualifiers(in float a[4], out float b[4], inout float c[4], const in float d[4], float e[4]) +{ + b[0] = a[0]; + c[0] += d[0]; + a[0] += 1.0; + e[0] += 1.0; + + b[1] = a[1]; + c[1] += d[1]; + a[1] += 1.0; + e[1] += 1.0; + + b[2] = a[2]; + c[2] += d[2]; + a[2] += 1.0; + e[2] += 1.0; + + b[3] = a[3]; + c[3] += d[3]; + a[3] += 1.0; + e[3] += 1.0; +} + + + +void main (void) +{ + float a[4]; + float b[4]; + float c[4]; + float d[4]; + float e[4]; + float q = 0.0; + float q2 = 0.0; + + a[0] = 1.0; + b[0] = 2.0; + c[0] = 3.0; + d[0] = 4.0; + e[0] = 1.0; + + a[1] = 1.0; + b[1] = 2.0; + c[1] = 3.0; + d[1] = 4.0; + e[1] = 1.0; + + a[2] = 1.0; + b[2] = 2.0; + c[2] = 3.0; + d[2] = 4.0; + e[2] = 1.0; + + a[3] = 1.0; + b[3] = 2.0; + c[3] = 3.0; + d[3] = 4.0; + e[3] = 1.0; + + qualifiers(a, b, c, d, e); + + // randomly test a value + if(a[0] == 1.0) q += 1.0; + if(b[1] == 1.0) q += 2.0; + if(c[2] == 7.0) q += 4.0; + if(d[3] == 4.0) q2 += 1.0; + if(e[0] == 1.0) q2 += 2.0; + + gl_FragColor = vec4(vec2(q / 7.0, q2 / 3.0), 1.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/array_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/array_float_vert.vert new file mode 100644 index 0000000000..79493b346f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/array_float_vert.vert @@ -0,0 +1,86 @@ + +/* +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 qualifiers(in float a[4], out float b[4], inout float c[4], const in float d[4], float e[4]) +{ + b[0] = a[0]; + c[0] += d[0]; + a[0] += 1.0; + e[0] += 1.0; + + b[1] = a[1]; + c[1] += d[1]; + a[1] += 1.0; + e[1] += 1.0; + + b[2] = a[2]; + c[2] += d[2]; + a[2] += 1.0; + e[2] += 1.0; + + b[3] = a[3]; + c[3] += d[3]; + a[3] += 1.0; + e[3] += 1.0; +} + + + + +void main (void) +{ + float a[4]; + float b[4]; + float c[4]; + float d[4]; + float e[4]; + float q = 0.0; + float q2 = 0.0; + + a[0] = 1.0; + b[0] = 2.0; + c[0] = 3.0; + d[0] = 4.0; + e[0] = 1.0; + + a[1] = 1.0; + b[1] = 2.0; + c[1] = 3.0; + d[1] = 4.0; + e[1] = 1.0; + + a[2] = 1.0; + b[2] = 2.0; + c[2] = 3.0; + d[2] = 4.0; + e[2] = 1.0; + + a[3] = 1.0; + b[3] = 2.0; + c[3] = 3.0; + d[3] = 4.0; + e[3] = 1.0; + + qualifiers(a, b, c, d, e); + + // randomly test a value + if(a[0] == 1.0) q += 1.0; + if(b[1] == 1.0) q += 2.0; + if(c[2] == 7.0) q += 4.0; + if(d[3] == 4.0) q2 += 1.0; + if(e[0] == 1.0) q2 += 2.0; + + color = vec4(vec2(q / 7.0, q2 / 3.0), 1.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag new file mode 100644 index 0000000000..17aab5dd42 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +bool function(bool par[3]); +bool is_all(const in bool array[3], const in bool value); +void set_all(out bool array[3], const in bool value); + +void main (void) +{ + bool par[3]; + bool ret = false; + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, true); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, true) && ret) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +bool function(bool par[3]) +{ + // Return the value of the array. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return true; + } + else + return false; +} + +bool is_all(const in bool array[3], const in bool value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bool array[3], const in bool value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_array_vert.vert new file mode 100644 index 0000000000..588457ecde --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_array_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; + +// Function declarations. +bool function(bool par[3]); +bool is_all(const in bool array[3], const in bool value); +void set_all(out bool array[3], const in bool value); + +void main (void) +{ + bool par[3]; + bool ret = false; + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, true); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, true) && ret) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +bool function(bool par[3]) +{ + // Return the value of the array. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return true; + } + else + return false; +} + +bool is_all(const in bool array[3], const in bool value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bool array[3], const in bool value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag new file mode 100644 index 0000000000..45cec23fd6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +bool function(bool par); + +void main (void) +{ + bool par = true; + bool ret = false; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(par && ret) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bool function(bool par) +{ + // Return the value of the parameter. + if(par) + { + // Test parameter qualifier (default is "in"). + par = false; + + return true; + } + else + return false; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert new file mode 100644 index 0000000000..6e8ef52a31 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +bool function(bool par); + +void main (void) +{ + bool par = true; + bool ret = false; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(par && ret) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bool function(bool par) +{ + // Return the value of the parameter. + if(par) + { + // Test parameter qualifier (default is "in"). + par = false; + + return true; + } + else + return false; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag new file mode 100644 index 0000000000..5444ddb914 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +bool function(in bool par[3]); +bool is_all(const in bool array[3], const in bool value); +void set_all(out bool array[3], const in bool value); + +void main (void) +{ + bool par[3]; + bool ret = false; + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, true); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, true) && ret) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bool function(in bool par[3]) +{ + // Return the value of the array. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return true; + } + else + return false; +} + +bool is_all(const in bool array[3], const in bool value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bool array[3], const in bool value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_array_vert.vert new file mode 100644 index 0000000000..9494f5f61b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_array_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; + +// Function declarations. +bool function(in bool par[3]); +bool is_all(const in bool array[3], const in bool value); +void set_all(out bool array[3], const in bool value); + +void main (void) +{ + bool par[3]; + bool ret = false; + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, true); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, true) && ret) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bool function(in bool par[3]) +{ + // Return the value of the array. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return true; + } + else + return false; +} + +bool is_all(const in bool array[3], const in bool value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bool array[3], const in bool value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag new file mode 100644 index 0000000000..432124dabb --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +bool function(in bool par); + +void main (void) +{ + bool par = true; + bool ret = false; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(par && ret) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bool function(in bool par) +{ + // Return the value of the parameter. + if(par) + { + // Test parameter qualifier (default is "in"). + par = false; + + return true; + } + else + return false; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert new file mode 100644 index 0000000000..7027edc7b9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +bool function(in bool par); + +void main (void) +{ + bool par = true; + bool ret = false; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(par && ret) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bool function(in bool par) +{ + // Return the value of the parameter. + if(par) + { + // Test parameter qualifier (default is "in"). + par = false; + + return true; + } + else + return false; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag new file mode 100644 index 0000000000..793e765b15 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +bool function(inout bool par[3]); +bool is_all(const in bool array[3], const in bool value); +void set_all(out bool array[3], const in bool value); + +void main (void) +{ + bool par[3]; + bool ret = false; + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, true); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, false) && ret) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bool function(inout bool par[3]) +{ + // Return the value of the array. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return true; + } + else + return false; +} + +bool is_all(const in bool array[3], const in bool value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bool array[3], const in bool value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_array_vert.vert new file mode 100644 index 0000000000..e881eda25b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_array_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; + +// Function declarations. +bool function(inout bool par[3]); +bool is_all(const in bool array[3], const in bool value); +void set_all(out bool array[3], const in bool value); + +void main (void) +{ + bool par[3]; + bool ret = false; + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, true); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, false) && ret) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bool function(inout bool par[3]) +{ + // Return the value of the array. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return true; + } + else + return false; +} + +bool is_all(const in bool array[3], const in bool value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bool array[3], const in bool value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag new file mode 100644 index 0000000000..cb20cb4604 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +bool function(inout bool par); + +void main (void) +{ + bool par = true; + bool ret = false; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(!par && ret) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bool function(inout bool par) +{ + // Return the value of the parameter. + if(par) + { + // Test parameter qualifier (default is "in"). + par = false; + + return true; + } + else + return false; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert new file mode 100644 index 0000000000..a1a9597bc9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +bool function(inout bool par); + +void main (void) +{ + bool par = true; + bool ret = false; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(!par && ret) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bool function(inout bool par) +{ + // Return the value of the parameter. + if(par) + { + // Test parameter qualifier (default is "in"). + par = false; + + return true; + } + else + return false; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag new file mode 100644 index 0000000000..aa7e08b1cf --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +bool function(out bool par[3]); +bool is_all(const in bool array[3], const in bool value); +void set_all(out bool array[3], const in bool value); + +void main (void) +{ + bool par[3]; + bool ret = false; + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, true); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, false) && ret) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bool function(out bool par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return true; +} + +bool is_all(const in bool array[3], const in bool value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bool array[3], const in bool value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert new file mode 100644 index 0000000000..485c22e687 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +bool function(out bool par[3]); +bool is_all(const in bool array[3], const in bool value); +void set_all(out bool array[3], const in bool value); + +void main (void) +{ + bool par[3]; + bool ret = false; + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, true); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, false) && ret) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bool function(out bool par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return true; +} + +bool is_all(const in bool array[3], const in bool value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bool array[3], const in bool value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_empty_frag.frag new file mode 100644 index 0000000000..2c0ffe7410 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_empty_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; + +// Function declaration. +bool function(out bool par); + +void main (void) +{ + bool par = true; + bool ret = false; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(!par && ret) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bool function(out bool par) +{ + // Test parameter qualifier (default is "in"). + par = false; + + return true; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_empty_vert.vert new file mode 100644 index 0000000000..21510b94bf --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bool_empty_out_bool_empty_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; + +// Function declaration. +bool function(out bool par); + +void main (void) +{ + bool par = true; + bool ret = false; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(!par && ret) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bool function(out bool par) +{ + // Test parameter qualifier (default is "in"). + par = false; + + return true; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag new file mode 100644 index 0000000000..269f051e0e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +bvec4 function(bvec4 par[3]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[3], const in bvec4 value); +void set_all(out bvec4 array[3], const in bvec4 value); + +void main (void) +{ + bvec4 par[3]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, bvec4(true, true, true, true)) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +bvec4 function(bvec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, bvec4(true, true, true, true))) + { + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[3], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[3], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert new file mode 100644 index 0000000000..ce77807866 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +bvec4 function(bvec4 par[3]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[3], const in bvec4 value); +void set_all(out bvec4 array[3], const in bvec4 value); + +void main (void) +{ + bvec4 par[3]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, bvec4(true, true, true, true)) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +bvec4 function(bvec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, bvec4(true, true, true, true))) + { + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[3], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[3], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag new file mode 100644 index 0000000000..3bab4609dd --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +bvec4 function(bvec4 par); +bool is_all(const in bvec4 par, const in bool value); +void set_all(out bvec4 par, const in bool value); + +void main (void) +{ + bvec4 par = bvec4(true, true, true, true); + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, true) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bvec4 function(bvec4 par) +{ + // Return the value of the parameter. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 par, const in bool value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_vert.vert new file mode 100644 index 0000000000..36ac4882ab --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_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; + +// Function declaration. +bvec4 function(bvec4 par); +bool is_all(const in bvec4 par, const in bool value); +void set_all(out bvec4 par, const in bool value); + +void main (void) +{ + bvec4 par = bvec4(true, true, true, true); + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, true) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bvec4 function(bvec4 par) +{ + // Return the value of the parameter. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 par, const in bool value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag new file mode 100644 index 0000000000..360cbd268c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +bvec4 function(in bvec4 par[3]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[3], const in bvec4 value); +void set_all(out bvec4 array[3], const in bvec4 value); + +void main (void) +{ + bvec4 par[3]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, bvec4(true, true, true, true)) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +bvec4 function(in bvec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, bvec4(true, true, true, true))) + { + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[3], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[3], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert new file mode 100644 index 0000000000..bd8fb8cd83 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +bvec4 function(in bvec4 par[3]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[3], const in bvec4 value); +void set_all(out bvec4 array[3], const in bvec4 value); + +void main (void) +{ + bvec4 par[3]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, bvec4(true, true, true, true)) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +bvec4 function(in bvec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, bvec4(true, true, true, true))) + { + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[3], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[3], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag new file mode 100644 index 0000000000..79b00fb08e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +bvec4 function(in bvec4 par); +bool is_all(const in bvec4 par, const in bool value); +void set_all(out bvec4 par, const in bool value); + +void main (void) +{ + bvec4 par = bvec4(true, true, true, true); + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, true) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bvec4 function(in bvec4 par) +{ + // Return the value of the parameter. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 par, const in bool value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_vert.vert new file mode 100644 index 0000000000..a0c0379b20 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_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; + +// Function declaration. +bvec4 function(in bvec4 par); +bool is_all(const in bvec4 par, const in bool value); +void set_all(out bvec4 par, const in bool value); + +void main (void) +{ + bvec4 par = bvec4(true, true, true, true); + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return true. + if(is_all(par, true) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bvec4 function(in bvec4 par) +{ + // Return the value of the parameter. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 par, const in bool value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag new file mode 100644 index 0000000000..571268392c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +bvec4 function(inout bvec4 par[3]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[3], const in bvec4 value); +void set_all(out bvec4 array[3], const in bvec4 value); + +void main (void) +{ + bvec4 par[3]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +bvec4 function(inout bvec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, bvec4(true, true, true, true))) + { + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[3], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[3], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert new file mode 100644 index 0000000000..3d4974f447 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +bvec4 function(inout bvec4 par[3]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[3], const in bvec4 value); +void set_all(out bvec4 array[3], const in bvec4 value); + +void main (void) +{ + bvec4 par[3]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +bvec4 function(inout bvec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, bvec4(true, true, true, true))) + { + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[3], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[3], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag new file mode 100644 index 0000000000..d4ede0875f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag @@ -0,0 +1,112 @@ + +/* +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; + +// Function declarations. +bvec4 function(inout bvec4 par[10]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[10], const in bvec4 value); +void set_all(out bvec4 array[10], const in bvec4 value); + +void main (void) +{ + bvec4 par[10]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +bvec4 function(inout bvec4 par[10]) +{ + // Return the value of the array. + if(is_all(par, bvec4(true, true, true, true))) + { + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[10], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + if(array[3] != value) + ret = false; + if(array[4] != value) + ret = false; + if(array[5] != value) + ret = false; + if(array[6] != value) + ret = false; + if(array[7] != value) + ret = false; + if(array[8] != value) + ret = false; + if(array[9] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[10], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; + array[3] = value; + array[4] = value; + array[5] = value; + array[6] = value; + array[7] = value; + array[8] = value; + array[9] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert new file mode 100644 index 0000000000..7107c7b67d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert @@ -0,0 +1,112 @@ + +/* +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; + +// Function declarations. +bvec4 function(inout bvec4 par[10]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[10], const in bvec4 value); +void set_all(out bvec4 array[10], const in bvec4 value); + +void main (void) +{ + bvec4 par[10]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +bvec4 function(inout bvec4 par[10]) +{ + // Return the value of the array. + if(is_all(par, bvec4(true, true, true, true))) + { + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[10], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + if(array[3] != value) + ret = false; + if(array[4] != value) + ret = false; + if(array[5] != value) + ret = false; + if(array[6] != value) + ret = false; + if(array[7] != value) + ret = false; + if(array[8] != value) + ret = false; + if(array[9] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[10], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; + array[3] = value; + array[4] = value; + array[5] = value; + array[6] = value; + array[7] = value; + array[8] = value; + array[9] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag new file mode 100644 index 0000000000..f592dbafea --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +bvec4 function(inout bvec4 par); +bool is_all(const in bvec4 par, const in bool value); +void set_all(out bvec4 par, const in bool value); + +void main (void) +{ + bvec4 par = bvec4(true, true, true, true); + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, false) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bvec4 function(inout bvec4 par) +{ + // Return the value of the parameter. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 par, const in bool value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_vert.vert new file mode 100644 index 0000000000..3983515e5a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_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; + +// Function declaration. +bvec4 function(inout bvec4 par); +bool is_all(const in bvec4 par, const in bool value); +void set_all(out bvec4 par, const in bool value); + +void main (void) +{ + bvec4 par = bvec4(true, true, true, true); + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, false) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bvec4 function(inout bvec4 par) +{ + // Return the value of the parameter. + if(is_all(par, true)) + { + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return bvec4(true, true, true, true); + } + else + return bvec4(false, false, false, false); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 par, const in bool value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag new file mode 100644 index 0000000000..e729340ad5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag @@ -0,0 +1,85 @@ + +/* +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; + +// Function declarations. +bvec4 function(out bvec4 par[3]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[3], const in bvec4 value); +void set_all(out bvec4 array[3], const in bvec4 value); + +void main (void) +{ + bvec4 par[3]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +bvec4 function(out bvec4 par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[3], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[3], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert new file mode 100644 index 0000000000..6146e5ba68 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert @@ -0,0 +1,85 @@ + +/* +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; + +// Function declarations. +bvec4 function(out bvec4 par[3]); +bool is_all(const in bvec4 par, const in bool value); +bool is_all(const in bvec4 array[3], const in bvec4 value); +void set_all(out bvec4 array[3], const in bvec4 value); + +void main (void) +{ + bvec4 par[3]; + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + // Initialize the entire array to true. + set_all(par, bvec4(true, true, true, true)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +bvec4 function(out bvec4 par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, bvec4(false, false, false, false)); + + return bvec4(true, true, true, true); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in bvec4 array[3], const in bvec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 array[3], const in bvec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag new file mode 100644 index 0000000000..b5cae27c4b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +bvec4 function(out bvec4 par); +bool is_all(const in bvec4 par, const in bool value); +void set_all(out bvec4 par, const in bool value); + +void main (void) +{ + bvec4 par = bvec4(true, true, true, true); + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, false) && is_all(ret, true)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +bvec4 function(out bvec4 par) +{ + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return bvec4(true, true, true, true); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 par, const in bool value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert new file mode 100644 index 0000000000..172df26f56 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +bvec4 function(out bvec4 par); +bool is_all(const in bvec4 par, const in bool value); +void set_all(out bvec4 par, const in bool value); + +void main (void) +{ + bvec4 par = bvec4(true, true, true, true); + bvec4 ret = bvec4(false, false, false, false); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return true. + if(is_all(par, false) && is_all(ret, true)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +bvec4 function(out bvec4 par) +{ + // Test parameter qualifier (default is "in"). + set_all(par, false); + + return bvec4(true, true, true, true); +} + +bool is_all(const in bvec4 par, const in bool value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out bvec4 par, const in bool value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag new file mode 100644 index 0000000000..ce4b5ec188 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +float function(float par[3]); +bool is_all(const in float array[3], const in float value); +void set_all(out float array[3], const in float value); + +void main (void) +{ + float par[3]; + float ret = 0.0; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, 1.0); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && (ret == 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +float function(float par[3]) +{ + // Return the value of the array. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return 1.0; + } + else + return 0.0; +} + +bool is_all(const in float array[3], const in float value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out float array[3], const in float value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_array_vert.vert new file mode 100644 index 0000000000..fbdca2f413 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_array_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; + +// Function declarations. +float function(float par[3]); +bool is_all(const in float array[3], const in float value); +void set_all(out float array[3], const in float value); + +void main (void) +{ + float par[3]; + float ret = 0.0; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, 1.0); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && (ret == 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +float function(float par[3]) +{ + // Return the value of the array. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return 1.0; + } + else + return 0.0; +} + +bool is_all(const in float array[3], const in float value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out float array[3], const in float value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag new file mode 100644 index 0000000000..73893e49b6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +float function(float par); + +void main (void) +{ + float par = 1.0; + float ret = 0.0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if((par == 1.0) && (ret == 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +float function(float par) +{ + // Return the value of the parameter. + if(par == 1.0) + { + // Test parameter qualifier (default is "in"). + par = 0.0; + + return 1.0; + } + else + return 0.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert new file mode 100644 index 0000000000..e8adae115d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +float function(float par); + +void main (void) +{ + float par = 1.0; + float ret = 0.0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if((par == 1.0) && (ret == 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +float function(float par) +{ + // Return the value of the parameter. + if(par == 1.0) + { + // Test parameter qualifier (default is "in"). + par = 0.0; + + return 1.0; + } + else + return 0.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag new file mode 100644 index 0000000000..ec02504e37 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +float function(in float par[3]); +bool is_all(const in float array[3], const in float value); +void set_all(out float array[3], const in float value); + +void main (void) +{ + float par[3]; + float ret = 0.0; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, 1.0); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && (ret == 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +float function(in float par[3]) +{ + // Return the value of the array. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return 1.0; + } + else + return 0.0; +} + +bool is_all(const in float array[3], const in float value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out float array[3], const in float value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_array_vert.vert new file mode 100644 index 0000000000..44617e0cfa --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_array_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; + +// Function declarations. +float function(in float par[3]); +bool is_all(const in float array[3], const in float value); +void set_all(out float array[3], const in float value); + +void main (void) +{ + float par[3]; + float ret = 0.0; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, 1.0); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && (ret == 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +float function(in float par[3]) +{ + // Return the value of the array. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return 1.0; + } + else + return 0.0; +} + +bool is_all(const in float array[3], const in float value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out float array[3], const in float value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag new file mode 100644 index 0000000000..ae16d2fd72 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +float function(in float par); + +void main (void) +{ + float par = 1.0; + float ret = 0.0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if((par == 1.0) && (ret == 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +float function(in float par) +{ + // Return the value of the parameter. + if(par == 1.0) + { + // Test parameter qualifier (default is "in"). + par = 0.0; + + return 1.0; + } + else + return 0.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert new file mode 100644 index 0000000000..cb5194e9a0 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +float function(in float par); + +void main (void) +{ + float par = 1.0; + float ret = 0.0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if((par == 1.0) && (ret == 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +float function(in float par) +{ + // Return the value of the parameter. + if(par == 1.0) + { + // Test parameter qualifier (default is "in"). + par = 0.0; + + return 1.0; + } + else + return 0.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag new file mode 100644 index 0000000000..ba3d159934 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +float function(inout float par[3]); +bool is_all(const in float array[3], const in float value); +void set_all(out float array[3], const in float value); + +void main (void) +{ + float par[3]; + float ret = 0.0; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, 1.0); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && (ret == 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +float function(inout float par[3]) +{ + // Return the value of the array. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return 1.0; + } + else + return 0.0; +} + +bool is_all(const in float array[3], const in float value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out float array[3], const in float value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_array_vert.vert new file mode 100644 index 0000000000..28f9778f02 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_array_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; + +// Function declarations. +float function(inout float par[3]); +bool is_all(const in float array[3], const in float value); +void set_all(out float array[3], const in float value); + +void main (void) +{ + float par[3]; + float ret = 0.0; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, 1.0); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && (ret == 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +float function(inout float par[3]) +{ + // Return the value of the array. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return 1.0; + } + else + return 0.0; +} + +bool is_all(const in float array[3], const in float value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out float array[3], const in float value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag new file mode 100644 index 0000000000..c0f08f4ed5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +float function(inout float par); + +void main (void) +{ + float par = 1.0; + float ret = 0.0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if((par == 0.0) && (ret == 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +float function(inout float par) +{ + // Return the value of the parameter. + if(par == 1.0) + { + // Test parameter qualifier (default is "in"). + par = 0.0; + + return 1.0; + } + else + return 0.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert new file mode 100644 index 0000000000..a4ccd8b159 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +float function(inout float par); + +void main (void) +{ + float par = 1.0; + float ret = 0.0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if((par == 0.0) && (ret == 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +float function(inout float par) +{ + // Return the value of the parameter. + if(par == 1.0) + { + // Test parameter qualifier (default is "in"). + par = 0.0; + + return 1.0; + } + else + return 0.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag new file mode 100644 index 0000000000..7a8b3b2e34 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +float function(out float par[3]); +bool is_all(const in float array[3], const in float value); +void set_all(out float array[3], const in float value); + +void main (void) +{ + float par[3]; + float ret = 0.0; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, 1.0); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && (ret == 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +float function(out float par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return 1.0; +} + +bool is_all(const in float array[3], const in float value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out float array[3], const in float value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert new file mode 100644 index 0000000000..5bcd67d5ff --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +float function(out float par[3]); +bool is_all(const in float array[3], const in float value); +void set_all(out float array[3], const in float value); + +void main (void) +{ + float par[3]; + float ret = 0.0; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, 1.0); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && (ret == 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +float function(out float par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return 1.0; +} + +bool is_all(const in float array[3], const in float value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out float array[3], const in float value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_empty_frag.frag new file mode 100644 index 0000000000..fc7870209f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_empty_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; + +// Function declaration. +float function(out float par); + +void main (void) +{ + float par = 1.0; + float ret = 0.0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if((par == 0.0) && (ret == 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +float function(out float par) +{ + // Test parameter qualifier (default is "in"). + par = 0.0; + + return 1.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_empty_vert.vert new file mode 100644 index 0000000000..a9f4da5dd9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/float_empty_out_float_empty_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; + +// Function declaration. +float function(out float par); + +void main (void) +{ + float par = 1.0; + float ret = 0.0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if((par == 0.0) && (ret == 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +float function(out float par) +{ + // Test parameter qualifier (default is "in"). + par = 0.0; + + return 1.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_001_to_008.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_001_to_008.html new file mode 100644 index 0000000000..c4a96140a5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_001_to_008.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_001_to_008.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "qualifiers_float_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "qualifiers_float_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "qualifiers_float_frag.frag" + }, + "name": "qualifiers_float_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "qualifiers_struct_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "qualifiers_struct_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "qualifiers_struct_frag.frag" + }, + "name": "qualifiers_struct_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "array_float_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "array_float_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "array_float_frag.frag" + }, + "name": "array_float_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "void_empty_empty_void_empty_frag.frag" + }, + "name": "void_empty_empty_void_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "void_empty_empty_void_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "void_empty_empty_void_empty_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_009_to_016.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_009_to_016.html new file mode 100644 index 0000000000..07308dbe1d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_009_to_016.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_009_to_016.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bool_empty_empty_bool_empty_frag.frag" + }, + "name": "bool_empty_empty_bool_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bool_empty_empty_bool_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bool_empty_empty_bool_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bool_empty_empty_bool_array_frag.frag" + }, + "name": "bool_empty_empty_bool_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bool_empty_empty_bool_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bool_empty_empty_bool_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bool_empty_in_bool_empty_frag.frag" + }, + "name": "bool_empty_in_bool_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bool_empty_in_bool_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bool_empty_in_bool_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bool_empty_in_bool_array_frag.frag" + }, + "name": "bool_empty_in_bool_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bool_empty_in_bool_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bool_empty_in_bool_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_017_to_024.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_017_to_024.html new file mode 100644 index 0000000000..9433423860 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_017_to_024.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_017_to_024.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bool_empty_inout_bool_empty_frag.frag" + }, + "name": "bool_empty_inout_bool_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bool_empty_inout_bool_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bool_empty_inout_bool_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bool_empty_inout_bool_array_frag.frag" + }, + "name": "bool_empty_inout_bool_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bool_empty_inout_bool_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bool_empty_inout_bool_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bool_empty_out_bool_empty_frag.frag" + }, + "name": "bool_empty_out_bool_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bool_empty_out_bool_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bool_empty_out_bool_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bool_empty_out_bool_array_frag.frag" + }, + "name": "bool_empty_out_bool_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bool_empty_out_bool_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bool_empty_out_bool_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_025_to_032.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_025_to_032.html new file mode 100644 index 0000000000..f8fd671a46 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_025_to_032.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_025_to_032.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "int_empty_empty_int_empty_frag.frag" + }, + "name": "int_empty_empty_int_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "int_empty_empty_int_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "int_empty_empty_int_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "int_empty_empty_int_array_frag.frag" + }, + "name": "int_empty_empty_int_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "int_empty_empty_int_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "int_empty_empty_int_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "int_empty_in_int_empty_frag.frag" + }, + "name": "int_empty_in_int_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "int_empty_in_int_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "int_empty_in_int_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "int_empty_in_int_array_frag.frag" + }, + "name": "int_empty_in_int_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "int_empty_in_int_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "int_empty_in_int_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_033_to_040.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_033_to_040.html new file mode 100644 index 0000000000..6b54e7d96b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_033_to_040.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_033_to_040.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "int_empty_inout_int_empty_frag.frag" + }, + "name": "int_empty_inout_int_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "int_empty_inout_int_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "int_empty_inout_int_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "int_empty_inout_int_array_frag.frag" + }, + "name": "int_empty_inout_int_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "int_empty_inout_int_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "int_empty_inout_int_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "int_empty_out_int_empty_frag.frag" + }, + "name": "int_empty_out_int_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "int_empty_out_int_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "int_empty_out_int_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "int_empty_out_int_array_frag.frag" + }, + "name": "int_empty_out_int_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "int_empty_out_int_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "int_empty_out_int_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_041_to_048.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_041_to_048.html new file mode 100644 index 0000000000..cc41133577 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_041_to_048.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_041_to_048.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "float_empty_empty_float_empty_frag.frag" + }, + "name": "float_empty_empty_float_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "float_empty_empty_float_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "float_empty_empty_float_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "float_empty_empty_float_array_frag.frag" + }, + "name": "float_empty_empty_float_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "float_empty_empty_float_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "float_empty_empty_float_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "float_empty_in_float_empty_frag.frag" + }, + "name": "float_empty_in_float_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "float_empty_in_float_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "float_empty_in_float_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "float_empty_in_float_array_frag.frag" + }, + "name": "float_empty_in_float_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "float_empty_in_float_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "float_empty_in_float_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_049_to_056.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_049_to_056.html new file mode 100644 index 0000000000..a78074c302 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_049_to_056.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_049_to_056.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "float_empty_inout_float_empty_frag.frag" + }, + "name": "float_empty_inout_float_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "float_empty_inout_float_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "float_empty_inout_float_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "float_empty_inout_float_array_frag.frag" + }, + "name": "float_empty_inout_float_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "float_empty_inout_float_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "float_empty_inout_float_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "float_empty_out_float_empty_frag.frag" + }, + "name": "float_empty_out_float_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "float_empty_out_float_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "float_empty_out_float_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "float_empty_out_float_array_frag.frag" + }, + "name": "float_empty_out_float_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "float_empty_out_float_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "float_empty_out_float_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_057_to_064.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_057_to_064.html new file mode 100644 index 0000000000..05e1e9b9f3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_057_to_064.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_057_to_064.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_empty_bvec4_empty_frag.frag" + }, + "name": "bvec4_empty_empty_bvec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_empty_bvec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_empty_bvec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_empty_bvec4_array_frag.frag" + }, + "name": "bvec4_empty_empty_bvec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_empty_bvec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_empty_bvec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_in_bvec4_empty_frag.frag" + }, + "name": "bvec4_empty_in_bvec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_in_bvec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_in_bvec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_in_bvec4_array_frag.frag" + }, + "name": "bvec4_empty_in_bvec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_in_bvec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_in_bvec4_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_065_to_072.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_065_to_072.html new file mode 100644 index 0000000000..85a1425d58 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_065_to_072.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_065_to_072.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_inout_bvec4_empty_frag.frag" + }, + "name": "bvec4_empty_inout_bvec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_inout_bvec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_inout_bvec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_inout_bvec4_array_frag.frag" + }, + "name": "bvec4_empty_inout_bvec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_inout_bvec4_bigarray_frag.frag" + }, + "name": "bvec4_empty_inout_bvec4_bigarray_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_inout_bvec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_inout_bvec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_inout_bvec4_bigarray_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_inout_bvec4_bigarray_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_out_bvec4_empty_frag.frag" + }, + "name": "bvec4_empty_out_bvec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_out_bvec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_out_bvec4_empty_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_073_to_080.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_073_to_080.html new file mode 100644 index 0000000000..6d8d5a69ce --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_073_to_080.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_073_to_080.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "bvec4_empty_out_bvec4_array_frag.frag" + }, + "name": "bvec4_empty_out_bvec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "bvec4_empty_out_bvec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "bvec4_empty_out_bvec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_empty_ivec4_empty_frag.frag" + }, + "name": "ivec4_empty_empty_ivec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_empty_ivec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_empty_ivec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_empty_ivec4_array_frag.frag" + }, + "name": "ivec4_empty_empty_ivec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_empty_ivec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_empty_ivec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_in_ivec4_empty_frag.frag" + }, + "name": "ivec4_empty_in_ivec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_in_ivec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_in_ivec4_empty_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_081_to_088.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_081_to_088.html new file mode 100644 index 0000000000..9fc2a45079 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_081_to_088.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_081_to_088.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_in_ivec4_array_frag.frag" + }, + "name": "ivec4_empty_in_ivec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_in_ivec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_in_ivec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_inout_ivec4_empty_frag.frag" + }, + "name": "ivec4_empty_inout_ivec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_inout_ivec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_inout_ivec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_inout_ivec4_array_frag.frag" + }, + "name": "ivec4_empty_inout_ivec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_inout_ivec4_bigarray_frag.frag" + }, + "name": "ivec4_empty_inout_ivec4_bigarray_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_inout_ivec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_inout_ivec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_inout_ivec4_bigarray_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_inout_ivec4_bigarray_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_089_to_096.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_089_to_096.html new file mode 100644 index 0000000000..df95fcdace --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_089_to_096.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_089_to_096.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_out_ivec4_empty_frag.frag" + }, + "name": "ivec4_empty_out_ivec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_out_ivec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_out_ivec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "ivec4_empty_out_ivec4_array_frag.frag" + }, + "name": "ivec4_empty_out_ivec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "ivec4_empty_out_ivec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "ivec4_empty_out_ivec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_empty_vec4_empty_frag.frag" + }, + "name": "vec4_empty_empty_vec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_empty_vec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_empty_vec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_empty_vec4_array_frag.frag" + }, + "name": "vec4_empty_empty_vec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_empty_vec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_empty_vec4_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_097_to_104.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_097_to_104.html new file mode 100644 index 0000000000..ecb3f995f9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_097_to_104.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_097_to_104.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_in_vec4_empty_frag.frag" + }, + "name": "vec4_empty_in_vec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_in_vec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_in_vec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_in_vec4_array_frag.frag" + }, + "name": "vec4_empty_in_vec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_in_vec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_in_vec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_inout_vec4_empty_frag.frag" + }, + "name": "vec4_empty_inout_vec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_inout_vec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_inout_vec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_inout_vec4_array_frag.frag" + }, + "name": "vec4_empty_inout_vec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_inout_vec4_bigarray_frag.frag" + }, + "name": "vec4_empty_inout_vec4_bigarray_frag.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_105_to_112.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_105_to_112.html new file mode 100644 index 0000000000..0c11edbe92 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_105_to_112.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_105_to_112.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_inout_vec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_inout_vec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_inout_vec4_bigarray_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_inout_vec4_bigarray_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_out_vec4_empty_frag.frag" + }, + "name": "vec4_empty_out_vec4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_out_vec4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_out_vec4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "vec4_empty_out_vec4_array_frag.frag" + }, + "name": "vec4_empty_out_vec4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "vec4_empty_out_vec4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "vec4_empty_out_vec4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mat4_empty_empty_mat4_empty_frag.frag" + }, + "name": "mat4_empty_empty_mat4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mat4_empty_empty_mat4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mat4_empty_empty_mat4_empty_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_113_to_120.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_113_to_120.html new file mode 100644 index 0000000000..aab1f2991e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_113_to_120.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_113_to_120.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mat4_empty_empty_mat4_array_frag.frag" + }, + "name": "mat4_empty_empty_mat4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mat4_empty_empty_mat4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mat4_empty_empty_mat4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mat4_empty_in_mat4_empty_frag.frag" + }, + "name": "mat4_empty_in_mat4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mat4_empty_in_mat4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mat4_empty_in_mat4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mat4_empty_in_mat4_array_frag.frag" + }, + "name": "mat4_empty_in_mat4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mat4_empty_in_mat4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mat4_empty_in_mat4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mat4_empty_inout_mat4_empty_frag.frag" + }, + "name": "mat4_empty_inout_mat4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mat4_empty_inout_mat4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mat4_empty_inout_mat4_empty_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_121_to_126.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_121_to_126.html new file mode 100644 index 0000000000..31d06809d3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/functions_121_to_126.html @@ -0,0 +1,181 @@ +<!DOCTYPE html> +<!-- this file is auto-generated. DO NOT EDIT. --> +<!-- +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. +--> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL GLSL conformance test: functions_121_to_126.html</title> +<link rel="stylesheet" href="../../../../resources/js-test-style.css" /> +<link rel="stylesheet" href="../../../../resources/ogles-tests.css" /> +<script src="../../../../js/js-test-pre.js"></script> +<script src="../../../../js/webgl-test-utils.js"></script> +<script src="../../ogles-utils.js"></script> +</head> +<body> +<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas> +<div id="description"></div> +<div id="console"></div> +</body> +<script> +"use strict"; +OpenGLESTestRunner.run({ + "tests": [ + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mat4_empty_inout_mat4_array_frag.frag" + }, + "name": "mat4_empty_inout_mat4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mat4_empty_inout_mat4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mat4_empty_inout_mat4_array_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mat4_empty_out_mat4_empty_frag.frag" + }, + "name": "mat4_empty_out_mat4_empty_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mat4_empty_out_mat4_empty_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mat4_empty_out_mat4_empty_vert.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mat4_empty_out_mat4_array_frag.frag" + }, + "name": "mat4_empty_out_mat4_array_frag.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "uniforms": { + "result": { + "count": 1, + "type": "uniform4fv", + "value": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + } + }, + "fragmentShader": "../default/expected.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "mat4_empty_out_mat4_array_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mat4_empty_out_mat4_array_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/input.run.txt new file mode 100644 index 0000000000..00b4fa8fa6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/input.run.txt @@ -0,0 +1,17 @@ +# this file is auto-generated. DO NOT EDIT. +functions_001_to_008.html +functions_009_to_016.html +functions_017_to_024.html +functions_025_to_032.html +functions_033_to_040.html +functions_041_to_048.html +functions_049_to_056.html +functions_057_to_064.html +functions_065_to_072.html +functions_073_to_080.html +functions_081_to_088.html +functions_089_to_096.html +functions_097_to_104.html +functions_105_to_112.html +functions_113_to_120.html +functions_121_to_126.html diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag new file mode 100644 index 0000000000..ed0cd8448a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +int function(int par[3]); +bool is_all(const in int array[3], const in int value); +void set_all(out int array[3], const in int value); + +void main (void) +{ + int par[3]; + int ret = 0; + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, 1); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, 1) && (ret == 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +int function(int par[3]) +{ + // Return the value of the array. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return 1; + } + else + return 0; +} + +bool is_all(const in int array[3], const in int value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out int array[3], const in int value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_array_vert.vert new file mode 100644 index 0000000000..14c6e128ab --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_array_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; + +// Function declarations. +int function(int par[3]); +bool is_all(const in int array[3], const in int value); +void set_all(out int array[3], const in int value); + +void main (void) +{ + int par[3]; + int ret = 0; + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, 1); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, 1) && (ret == 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +int function(int par[3]) +{ + // Return the value of the array. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return 1; + } + else + return 0; +} + +bool is_all(const in int array[3], const in int value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out int array[3], const in int value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag new file mode 100644 index 0000000000..65da05bbb0 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +int function(int par); + +void main (void) +{ + int par = 1; + int ret = 0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if((par == 1) && (ret == 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +int function(int par) +{ + // Return the value of the parameter. + if(par == 1) + { + // Test parameter qualifier (default is "in"). + par = 0; + + return 1; + } + else + return 0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert new file mode 100644 index 0000000000..7bda7a7e29 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +int function(int par); + +void main (void) +{ + int par = 1; + int ret = 0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if((par == 1) && (ret == 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +int function(int par) +{ + // Return the value of the parameter. + if(par == 1) + { + // Test parameter qualifier (default is "in"). + par = 0; + + return 1; + } + else + return 0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag new file mode 100644 index 0000000000..e57c9fa1d3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +int function(in int par[3]); +bool is_all(const in int array[3], const in int value); +void set_all(out int array[3], const in int value); + +void main (void) +{ + int par[3]; + int ret = 0; + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, 1); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, 1) && (ret == 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +int function(in int par[3]) +{ + // Return the value of the array. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return 1; + } + else + return 0; +} + +bool is_all(const in int array[3], const in int value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out int array[3], const in int value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_array_vert.vert new file mode 100644 index 0000000000..df6e4a1bb4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_array_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; + +// Function declarations. +int function(in int par[3]); +bool is_all(const in int array[3], const in int value); +void set_all(out int array[3], const in int value); + +void main (void) +{ + int par[3]; + int ret = 0; + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, 1); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, 1) && (ret == 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +int function(in int par[3]) +{ + // Return the value of the array. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return 1; + } + else + return 0; +} + +bool is_all(const in int array[3], const in int value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out int array[3], const in int value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag new file mode 100644 index 0000000000..f231711c7f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +int function(in int par); + +void main (void) +{ + int par = 1; + int ret = 0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if((par == 1) && (ret == 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +int function(in int par) +{ + // Return the value of the parameter. + if(par == 1) + { + // Test parameter qualifier (default is "in"). + par = 0; + + return 1; + } + else + return 0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert new file mode 100644 index 0000000000..595313758e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +int function(in int par); + +void main (void) +{ + int par = 1; + int ret = 0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if((par == 1) && (ret == 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +int function(in int par) +{ + // Return the value of the parameter. + if(par == 1) + { + // Test parameter qualifier (default is "in"). + par = 0; + + return 1; + } + else + return 0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag new file mode 100644 index 0000000000..f68223b0ca --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declarations. +int function(inout int par[3]); +bool is_all(const in int array[3], const in int value); +void set_all(out int array[3], const in int value); + +void main (void) +{ + int par[3]; + int ret = 0; + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, 1); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, 0) && (ret == 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +int function(inout int par[3]) +{ + // Return the value of the array. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return 1; + } + else + return 0; +} + +bool is_all(const in int array[3], const in int value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out int array[3], const in int value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_array_vert.vert new file mode 100644 index 0000000000..d4bb19272a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_array_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; + +// Function declarations. +int function(inout int par[3]); +bool is_all(const in int array[3], const in int value); +void set_all(out int array[3], const in int value); + +void main (void) +{ + int par[3]; + int ret = 0; + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, 1); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, 0) && (ret == 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +int function(inout int par[3]) +{ + // Return the value of the array. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return 1; + } + else + return 0; +} + +bool is_all(const in int array[3], const in int value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out int array[3], const in int value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag new file mode 100644 index 0000000000..a9ff21b164 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +int function(inout int par); + +void main (void) +{ + int par = 1; + int ret = 0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if((par == 0) && (ret == 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +int function(inout int par) +{ + // Return the value of the parameter. + if(par == 1) + { + // Test parameter qualifier (default is "in"). + par = 0; + + return 1; + } + else + return 0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert new file mode 100644 index 0000000000..81a43a3a84 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert @@ -0,0 +1,48 @@ + +/* +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; + +// Function declaration. +int function(inout int par); + +void main (void) +{ + int par = 1; + int ret = 0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if((par == 0) && (ret == 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +int function(inout int par) +{ + // Return the value of the parameter. + if(par == 1) + { + // Test parameter qualifier (default is "in"). + par = 0; + + return 1; + } + else + return 0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag new file mode 100644 index 0000000000..aa2c2c04b5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +int function(out int par[3]); +bool is_all(const in int array[3], const in int value); +void set_all(out int array[3], const in int value); + +void main (void) +{ + int par[3]; + int ret = 0; + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, 1); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, 0) && (ret == 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +int function(out int par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return 1; +} + +bool is_all(const in int array[3], const in int value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out int array[3], const in int value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert new file mode 100644 index 0000000000..ecbd64bcf2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +int function(out int par[3]); +bool is_all(const in int array[3], const in int value); +void set_all(out int array[3], const in int value); + +void main (void) +{ + int par[3]; + int ret = 0; + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, 1); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, 0) && (ret == 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +int function(out int par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return 1; +} + +bool is_all(const in int array[3], const in int value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out int array[3], const in int value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_empty_frag.frag new file mode 100644 index 0000000000..55bc54d191 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_empty_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; + +// Function declaration. +int function(out int par); + +void main (void) +{ + int par = 1; + int ret = 0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if((par == 0) && (ret == 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +int function(out int par) +{ + // Test parameter qualifier (default is "in"). + par = 0; + + return 1; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_empty_vert.vert new file mode 100644 index 0000000000..efe8841aba --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/int_empty_out_int_empty_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; + +// Function declaration. +int function(out int par); + +void main (void) +{ + int par = 1; + int ret = 0; + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if((par == 0) && (ret == 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +int function(out int par) +{ + // Test parameter qualifier (default is "in"). + par = 0; + + return 1; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag new file mode 100644 index 0000000000..2f33f935e5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +ivec4 function(ivec4 par[3]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[3], const in ivec4 value); +void set_all(out ivec4 array[3], const in ivec4 value); + +void main (void) +{ + ivec4 par[3]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, ivec4(1, 1, 1, 1)) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +ivec4 function(ivec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, ivec4(1, 1, 1, 1))) + { + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[3], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[3], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert new file mode 100644 index 0000000000..8b6b5703dd --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +ivec4 function(ivec4 par[3]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[3], const in ivec4 value); +void set_all(out ivec4 array[3], const in ivec4 value); + +void main (void) +{ + ivec4 par[3]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, ivec4(1, 1, 1, 1)) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +ivec4 function(ivec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, ivec4(1, 1, 1, 1))) + { + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[3], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[3], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag new file mode 100644 index 0000000000..f23078171e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +ivec4 function(ivec4 par); +bool is_all(const in ivec4 par, const in int value); +void set_all(out ivec4 par, const in int value); + +void main (void) +{ + ivec4 par = ivec4(1, 1, 1, 1); + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, 1) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +ivec4 function(ivec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 par, const in int value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_vert.vert new file mode 100644 index 0000000000..20e691c73a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_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; + +// Function declaration. +ivec4 function(ivec4 par); +bool is_all(const in ivec4 par, const in int value); +void set_all(out ivec4 par, const in int value); + +void main (void) +{ + ivec4 par = ivec4(1, 1, 1, 1); + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, 1) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +ivec4 function(ivec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 par, const in int value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag new file mode 100644 index 0000000000..5fbcd07600 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +ivec4 function(in ivec4 par[3]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[3], const in ivec4 value); +void set_all(out ivec4 array[3], const in ivec4 value); + +void main (void) +{ + ivec4 par[3]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, ivec4(1, 1, 1, 1)) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +ivec4 function(in ivec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, ivec4(1, 1, 1, 1))) + { + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[3], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[3], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert new file mode 100644 index 0000000000..ef859a4f61 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +ivec4 function(in ivec4 par[3]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[3], const in ivec4 value); +void set_all(out ivec4 array[3], const in ivec4 value); + +void main (void) +{ + ivec4 par[3]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, ivec4(1, 1, 1, 1)) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +ivec4 function(in ivec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, ivec4(1, 1, 1, 1))) + { + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[3], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[3], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag new file mode 100644 index 0000000000..273424504f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +ivec4 function(in ivec4 par); +bool is_all(const in ivec4 par, const in int value); +void set_all(out ivec4 par, const in int value); + +void main (void) +{ + ivec4 par = ivec4(1, 1, 1, 1); + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, 1) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +ivec4 function(in ivec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 par, const in int value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_vert.vert new file mode 100644 index 0000000000..29840bd98c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_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; + +// Function declaration. +ivec4 function(in ivec4 par); +bool is_all(const in ivec4 par, const in int value); +void set_all(out ivec4 par, const in int value); + +void main (void) +{ + ivec4 par = ivec4(1, 1, 1, 1); + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1. + if(is_all(par, 1) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +ivec4 function(in ivec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 par, const in int value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag new file mode 100644 index 0000000000..120d99b4ef --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +ivec4 function(inout ivec4 par[3]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[3], const in ivec4 value); +void set_all(out ivec4 array[3], const in ivec4 value); + +void main (void) +{ + ivec4 par[3]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +ivec4 function(inout ivec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, ivec4(1, 1, 1, 1))) + { + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[3], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[3], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert new file mode 100644 index 0000000000..27f136927c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +ivec4 function(inout ivec4 par[3]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[3], const in ivec4 value); +void set_all(out ivec4 array[3], const in ivec4 value); + +void main (void) +{ + ivec4 par[3]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +ivec4 function(inout ivec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, ivec4(1, 1, 1, 1))) + { + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[3], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[3], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag new file mode 100644 index 0000000000..091ca82e94 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag @@ -0,0 +1,112 @@ + +/* +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; + +// Function declarations. +ivec4 function(inout ivec4 par[10]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[10], const in ivec4 value); +void set_all(out ivec4 array[10], const in ivec4 value); + +void main (void) +{ + ivec4 par[10]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +ivec4 function(inout ivec4 par[10]) +{ + // Return the value of the array. + if(is_all(par, ivec4(1, 1, 1, 1))) + { + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[10], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + if(array[3] != value) + ret = false; + if(array[4] != value) + ret = false; + if(array[5] != value) + ret = false; + if(array[6] != value) + ret = false; + if(array[7] != value) + ret = false; + if(array[8] != value) + ret = false; + if(array[9] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[10], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; + array[3] = value; + array[4] = value; + array[5] = value; + array[6] = value; + array[7] = value; + array[8] = value; + array[9] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert new file mode 100644 index 0000000000..08e15a0451 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert @@ -0,0 +1,112 @@ + +/* +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; + +// Function declarations. +ivec4 function(inout ivec4 par[10]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[10], const in ivec4 value); +void set_all(out ivec4 array[10], const in ivec4 value); + +void main (void) +{ + ivec4 par[10]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +ivec4 function(inout ivec4 par[10]) +{ + // Return the value of the array. + if(is_all(par, ivec4(1, 1, 1, 1))) + { + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[10], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + if(array[3] != value) + ret = false; + if(array[4] != value) + ret = false; + if(array[5] != value) + ret = false; + if(array[6] != value) + ret = false; + if(array[7] != value) + ret = false; + if(array[8] != value) + ret = false; + if(array[9] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[10], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; + array[3] = value; + array[4] = value; + array[5] = value; + array[6] = value; + array[7] = value; + array[8] = value; + array[9] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag new file mode 100644 index 0000000000..4714af5f98 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +ivec4 function(inout ivec4 par); +bool is_all(const in ivec4 par, const in int value); +void set_all(out ivec4 par, const in int value); + +void main (void) +{ + ivec4 par = ivec4(1, 1, 1, 1); + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, 0) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +ivec4 function(inout ivec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 par, const in int value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_vert.vert new file mode 100644 index 0000000000..d51f33952b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_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; + +// Function declaration. +ivec4 function(inout ivec4 par); +bool is_all(const in ivec4 par, const in int value); +void set_all(out ivec4 par, const in int value); + +void main (void) +{ + ivec4 par = ivec4(1, 1, 1, 1); + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, 0) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +ivec4 function(inout ivec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return ivec4(1, 1, 1, 1); + } + else + return ivec4(0, 0, 0, 0); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 par, const in int value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag new file mode 100644 index 0000000000..cb968348b2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag @@ -0,0 +1,85 @@ + +/* +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; + +// Function declarations. +ivec4 function(out ivec4 par[3]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[3], const in ivec4 value); +void set_all(out ivec4 array[3], const in ivec4 value); + +void main (void) +{ + ivec4 par[3]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +ivec4 function(out ivec4 par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[3], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[3], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert new file mode 100644 index 0000000000..398a683e27 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert @@ -0,0 +1,85 @@ + +/* +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; + +// Function declarations. +ivec4 function(out ivec4 par[3]); +bool is_all(const in ivec4 par, const in int value); +bool is_all(const in ivec4 array[3], const in ivec4 value); +void set_all(out ivec4 array[3], const in ivec4 value); + +void main (void) +{ + ivec4 par[3]; + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + // Initialize the entire array to 1. + set_all(par, ivec4(1, 1, 1, 1)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +ivec4 function(out ivec4 par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, ivec4(0, 0, 0, 0)); + + return ivec4(1, 1, 1, 1); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in ivec4 array[3], const in ivec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 array[3], const in ivec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag new file mode 100644 index 0000000000..d74a722f6e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +ivec4 function(out ivec4 par); +bool is_all(const in ivec4 par, const in int value); +void set_all(out ivec4 par, const in int value); + +void main (void) +{ + ivec4 par = ivec4(1, 1, 1, 1); + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, 0) && is_all(ret, 1)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +ivec4 function(out ivec4 par) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return ivec4(1, 1, 1, 1); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 par, const in int value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert new file mode 100644 index 0000000000..34ff61d5d2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +ivec4 function(out ivec4 par); +bool is_all(const in ivec4 par, const in int value); +void set_all(out ivec4 par, const in int value); + +void main (void) +{ + ivec4 par = ivec4(1, 1, 1, 1); + ivec4 ret = ivec4(0, 0, 0, 0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1. + if(is_all(par, 0) && is_all(ret, 1)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +ivec4 function(out ivec4 par) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0); + + return ivec4(1, 1, 1, 1); +} + +bool is_all(const in ivec4 par, const in int value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out ivec4 par, const in int value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag new file mode 100644 index 0000000000..f2f0704cd4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag @@ -0,0 +1,124 @@ + +/* +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 mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + +// Function declarations. +mat4 function(mat4 par[2]); +bool is_all(const in mat4 par, const in float value); +bool is_all(const in mat4 array[2], const in mat4 value); +void set_all(out mat4 array[2], const in mat4 value); + +void main (void) +{ + mat4 par[2]; + mat4 ret = mat_zeros; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, mat_ones); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, mat_ones) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +mat4 function(mat4 par[2]) +{ + // Return the value of the array. + if(is_all(par, mat_ones)) + { + // Test parameter qualifier (default is "in"). + set_all(par, mat_zeros); + + return mat_ones; + } + else + return mat_zeros; +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +bool is_all(const in mat4 array[2], const in mat4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 array[2], const in mat4 value) +{ + array[0] = value; + array[1] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert new file mode 100644 index 0000000000..ff293ced8e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert @@ -0,0 +1,124 @@ + +/* +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 mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + +// Function declarations. +mat4 function(mat4 par[2]); +bool is_all(const in mat4 par, const in float value); +bool is_all(const in mat4 array[2], const in mat4 value); +void set_all(out mat4 array[2], const in mat4 value); + +void main (void) +{ + mat4 par[2]; + mat4 ret = mat_zeros; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, mat_ones); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, mat_ones) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +mat4 function(mat4 par[2]) +{ + // Return the value of the array. + if(is_all(par, mat_ones)) + { + // Test parameter qualifier (default is "in"). + set_all(par, mat_zeros); + + return mat_ones; + } + else + return mat_zeros; +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +bool is_all(const in mat4 array[2], const in mat4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 array[2], const in mat4 value) +{ + array[0] = value; + array[1] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag new file mode 100644 index 0000000000..4a075bad93 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag @@ -0,0 +1,128 @@ + +/* +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; + +// Function declaration. +mat4 function(mat4 par); +bool is_all(const in mat4 par, const in float value); +void set_all(out mat4 par, const in float value); + +void main (void) +{ + mat4 par = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + mat4 ret = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +mat4 function(mat4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + } + else + return mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 par, const in float value) +{ + par[0][0] = value; + par[0][1] = value; + par[0][2] = value; + par[0][3] = value; + + par[1][0] = value; + par[1][1] = value; + par[1][2] = value; + par[1][3] = value; + + par[2][0] = value; + par[2][1] = value; + par[2][2] = value; + par[2][3] = value; + + par[3][0] = value; + par[3][1] = value; + par[3][2] = value; + par[3][3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert new file mode 100644 index 0000000000..bbbcf59ece --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert @@ -0,0 +1,128 @@ + +/* +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; + +// Function declaration. +mat4 function(mat4 par); +bool is_all(const in mat4 par, const in float value); +void set_all(out mat4 par, const in float value); + +void main (void) +{ + mat4 par = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + mat4 ret = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +mat4 function(mat4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + } + else + return mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 par, const in float value) +{ + par[0][0] = value; + par[0][1] = value; + par[0][2] = value; + par[0][3] = value; + + par[1][0] = value; + par[1][1] = value; + par[1][2] = value; + par[1][3] = value; + + par[2][0] = value; + par[2][1] = value; + par[2][2] = value; + par[2][3] = value; + + par[3][0] = value; + par[3][1] = value; + par[3][2] = value; + par[3][3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag new file mode 100644 index 0000000000..c7eac72b97 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag @@ -0,0 +1,124 @@ + +/* +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 mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + +// Function declarations. +mat4 function(in mat4 par[2]); +bool is_all(const in mat4 par, const in float value); +bool is_all(const in mat4 array[2], const in mat4 value); +void set_all(out mat4 array[2], const in mat4 value); + +void main (void) +{ + mat4 par[2]; + mat4 ret = mat_zeros; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, mat_ones); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, mat_ones) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +mat4 function(in mat4 par[2]) +{ + // Return the value of the array. + if(is_all(par, mat_ones)) + { + // Test parameter qualifier (default is "in"). + set_all(par, mat_zeros); + + return mat_ones; + } + else + return mat_zeros; +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +bool is_all(const in mat4 array[2], const in mat4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 array[2], const in mat4 value) +{ + array[0] = value; + array[1] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert new file mode 100644 index 0000000000..0b57cc9907 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert @@ -0,0 +1,124 @@ + +/* +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 mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + +// Function declarations. +mat4 function(in mat4 par[2]); +bool is_all(const in mat4 par, const in float value); +bool is_all(const in mat4 array[2], const in mat4 value); +void set_all(out mat4 array[2], const in mat4 value); + +void main (void) +{ + mat4 par[2]; + mat4 ret = mat_zeros; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, mat_ones); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, mat_ones) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +mat4 function(in mat4 par[2]) +{ + // Return the value of the array. + if(is_all(par, mat_ones)) + { + // Test parameter qualifier (default is "in"). + set_all(par, mat_zeros); + + return mat_ones; + } + else + return mat_zeros; +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +bool is_all(const in mat4 array[2], const in mat4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 array[2], const in mat4 value) +{ + array[0] = value; + array[1] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag new file mode 100644 index 0000000000..87cb50e8a4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag @@ -0,0 +1,128 @@ + +/* +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; + +// Function declaration. +mat4 function(in mat4 par); +bool is_all(const in mat4 par, const in float value); +void set_all(out mat4 par, const in float value); + +void main (void) +{ + mat4 par = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + mat4 ret = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +mat4 function(in mat4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + } + else + return mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 par, const in float value) +{ + par[0][0] = value; + par[0][1] = value; + par[0][2] = value; + par[0][3] = value; + + par[1][0] = value; + par[1][1] = value; + par[1][2] = value; + par[1][3] = value; + + par[2][0] = value; + par[2][1] = value; + par[2][2] = value; + par[2][3] = value; + + par[3][0] = value; + par[3][1] = value; + par[3][2] = value; + par[3][3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert new file mode 100644 index 0000000000..b78e227891 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert @@ -0,0 +1,128 @@ + +/* +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; + +// Function declaration. +mat4 function(in mat4 par); +bool is_all(const in mat4 par, const in float value); +void set_all(out mat4 par, const in float value); + +void main (void) +{ + mat4 par = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + mat4 ret = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +mat4 function(in mat4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + } + else + return mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 par, const in float value) +{ + par[0][0] = value; + par[0][1] = value; + par[0][2] = value; + par[0][3] = value; + + par[1][0] = value; + par[1][1] = value; + par[1][2] = value; + par[1][3] = value; + + par[2][0] = value; + par[2][1] = value; + par[2][2] = value; + par[2][3] = value; + + par[3][0] = value; + par[3][1] = value; + par[3][2] = value; + par[3][3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag new file mode 100644 index 0000000000..1fd7215414 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag @@ -0,0 +1,124 @@ + +/* +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 mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + +// Function declarations. +mat4 function(inout mat4 par[2]); +bool is_all(const in mat4 par, const in float value); +bool is_all(const in mat4 array[2], const in mat4 value); +void set_all(out mat4 array[2], const in mat4 value); + +void main (void) +{ + mat4 par[2]; + mat4 ret = mat_zeros; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, mat_ones); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, mat_zeros) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +mat4 function(inout mat4 par[2]) +{ + // Return the value of the array. + if(is_all(par, mat_ones)) + { + // Test parameter qualifier (default is "in"). + set_all(par, mat_zeros); + + return mat_ones; + } + else + return mat_zeros; +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +bool is_all(const in mat4 array[2], const in mat4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 array[2], const in mat4 value) +{ + array[0] = value; + array[1] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert new file mode 100644 index 0000000000..d2e6f02581 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert @@ -0,0 +1,124 @@ + +/* +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 mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + +// Function declarations. +mat4 function(inout mat4 par[2]); +bool is_all(const in mat4 par, const in float value); +bool is_all(const in mat4 array[2], const in mat4 value); +void set_all(out mat4 array[2], const in mat4 value); + +void main (void) +{ + mat4 par[2]; + mat4 ret = mat_zeros; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, mat_ones); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, mat_zeros) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +mat4 function(inout mat4 par[2]) +{ + // Return the value of the array. + if(is_all(par, mat_ones)) + { + // Test parameter qualifier (default is "in"). + set_all(par, mat_zeros); + + return mat_ones; + } + else + return mat_zeros; +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +bool is_all(const in mat4 array[2], const in mat4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 array[2], const in mat4 value) +{ + array[0] = value; + array[1] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag new file mode 100644 index 0000000000..8aee0309fd --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag @@ -0,0 +1,128 @@ + +/* +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; + +// Function declaration. +mat4 function(inout mat4 par); +bool is_all(const in mat4 par, const in float value); +void set_all(out mat4 par, const in float value); + +void main (void) +{ + mat4 par = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + mat4 ret = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +mat4 function(inout mat4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + } + else + return mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 par, const in float value) +{ + par[0][0] = value; + par[0][1] = value; + par[0][2] = value; + par[0][3] = value; + + par[1][0] = value; + par[1][1] = value; + par[1][2] = value; + par[1][3] = value; + + par[2][0] = value; + par[2][1] = value; + par[2][2] = value; + par[2][3] = value; + + par[3][0] = value; + par[3][1] = value; + par[3][2] = value; + par[3][3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert new file mode 100644 index 0000000000..210f5addb6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert @@ -0,0 +1,128 @@ + +/* +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; + +// Function declaration. +mat4 function(inout mat4 par); +bool is_all(const in mat4 par, const in float value); +void set_all(out mat4 par, const in float value); + +void main (void) +{ + mat4 par = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + mat4 ret = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +mat4 function(inout mat4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + } + else + return mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 par, const in float value) +{ + par[0][0] = value; + par[0][1] = value; + par[0][2] = value; + par[0][3] = value; + + par[1][0] = value; + par[1][1] = value; + par[1][2] = value; + par[1][3] = value; + + par[2][0] = value; + par[2][1] = value; + par[2][2] = value; + par[2][3] = value; + + par[3][0] = value; + par[3][1] = value; + par[3][2] = value; + par[3][3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag new file mode 100644 index 0000000000..52ece666f1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag @@ -0,0 +1,118 @@ + +/* +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 mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + +// Function declarations. +mat4 function(out mat4 par[2]); +bool is_all(const in mat4 par, const in float value); +bool is_all(const in mat4 array[2], const in mat4 value); +void set_all(out mat4 array[2], const in mat4 value); + +void main (void) +{ + mat4 par[2]; + mat4 ret = mat_zeros; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, mat_ones); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, mat_zeros) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +mat4 function(out mat4 par[2]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, mat_zeros); + + return mat_ones; +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +bool is_all(const in mat4 array[2], const in mat4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 array[2], const in mat4 value) +{ + array[0] = value; + array[1] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert new file mode 100644 index 0000000000..ee52d45730 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert @@ -0,0 +1,118 @@ + +/* +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 mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + +// Function declarations. +mat4 function(out mat4 par[2]); +bool is_all(const in mat4 par, const in float value); +bool is_all(const in mat4 array[2], const in mat4 value); +void set_all(out mat4 array[2], const in mat4 value); + +void main (void) +{ + mat4 par[2]; + mat4 ret = mat_zeros; + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, mat_ones); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, mat_zeros) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +mat4 function(out mat4 par[2]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, mat_zeros); + + return mat_ones; +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +bool is_all(const in mat4 array[2], const in mat4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 array[2], const in mat4 value) +{ + array[0] = value; + array[1] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag new file mode 100644 index 0000000000..f88bba050b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag @@ -0,0 +1,119 @@ + +/* +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; + +// Function declaration. +mat4 function(out mat4 par); +bool is_all(const in mat4 par, const in float value); +void set_all(out mat4 par, const in float value); + +void main (void) +{ + mat4 par = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + mat4 ret = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +mat4 function(out mat4 par) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 par, const in float value) +{ + par[0][0] = value; + par[0][1] = value; + par[0][2] = value; + par[0][3] = value; + + par[1][0] = value; + par[1][1] = value; + par[1][2] = value; + par[1][3] = value; + + par[2][0] = value; + par[2][1] = value; + par[2][2] = value; + par[2][3] = value; + + par[3][0] = value; + par[3][1] = value; + par[3][2] = value; + par[3][3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert new file mode 100644 index 0000000000..c593be2a56 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert @@ -0,0 +1,119 @@ + +/* +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; + +// Function declaration. +mat4 function(out mat4 par); +bool is_all(const in mat4 par, const in float value); +void set_all(out mat4 par, const in float value); + +void main (void) +{ + mat4 par = mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); + mat4 ret = mat4(0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +mat4 function(out mat4 par) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return mat4(1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0); +} + +bool is_all(const in mat4 par, const in float value) +{ + bool ret = true; + + if(par[0][0] != value) + ret = false; + if(par[0][1] != value) + ret = false; + if(par[0][2] != value) + ret = false; + if(par[0][3] != value) + ret = false; + + if(par[1][0] != value) + ret = false; + if(par[1][1] != value) + ret = false; + if(par[1][2] != value) + ret = false; + if(par[1][3] != value) + ret = false; + + if(par[2][0] != value) + ret = false; + if(par[2][1] != value) + ret = false; + if(par[2][2] != value) + ret = false; + if(par[2][3] != value) + ret = false; + + if(par[3][0] != value) + ret = false; + if(par[3][1] != value) + ret = false; + if(par[3][2] != value) + ret = false; + if(par[3][3] != value) + ret = false; + + return ret; +} + +void set_all(out mat4 par, const in float value) +{ + par[0][0] = value; + par[0][1] = value; + par[0][2] = value; + par[0][3] = value; + + par[1][0] = value; + par[1][1] = value; + par[1][2] = value; + par[1][3] = value; + + par[2][0] = value; + par[2][1] = value; + par[2][2] = value; + par[2][3] = value; + + par[3][0] = value; + par[3][1] = value; + par[3][2] = value; + par[3][3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_float_frag.frag new file mode 100644 index 0000000000..880331e3af --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_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; + + + +float qualifiers(in float a, out float b, inout float c, const in float d, float e) +{ + b = a; + c += d; + a += 1.0; + return e; +} + + + +void main (void) +{ + float a = 1.0, b = 2.0, c = 3.0, d = 4.0, e = 1.0, f = 0.0; + float q = 0.0; + float q2 = 0.0; + + f = qualifiers(a, b, c, d, e); + + if(a == 1.0) q += 1.0; + if(b == 1.0) q += 2.0; + if(c == 7.0) q += 4.0; + if(d == 4.0) q2 += 1.0; + if(e == 1.0) q2 += 2.0; + if(f == 1.0) q2 += 4.0; + + gl_FragColor = vec4(vec2(q / 7.0, q2 / 7.0), 1.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_float_vert.vert new file mode 100644 index 0000000000..5142df2f03 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_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; + + + +float qualifiers(in float a, out float b, inout float c, const in float d, float e) +{ + b = a; + c += d; + a += 1.0; + return e; +} + + + +void main (void) +{ + float a = 1.0, b = 2.0, c = 3.0, d = 4.0, e = 1.0, f = 0.0; + float q = 0.0; + float q2 = 0.0; + + f = qualifiers(a, b, c, d, e); + + if(a == 1.0) q += 1.0; + if(b == 1.0) q += 2.0; + if(c == 7.0) q += 4.0; + if(d == 4.0) q2 += 1.0; + if(e == 1.0) q2 += 2.0; + if(f == 1.0) q2 += 4.0; + + color = vec4(vec2(q / 7.0, q2 / 7.0), 1.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_struct_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_struct_frag.frag new file mode 100644 index 0000000000..6d1a7e75c0 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_struct_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 +struct sabcd +{ + float a; + float b; + float c; + float d; +}; + + + +sabcd qualifiers(in sabcd a, out sabcd b, inout sabcd c, const in sabcd d, +sabcd e) +{ + sabcd one = sabcd(1.0, 1.0, 1.0, 1.0); + + b = a; + + c.a += d.a; + c.b += d.b; + c.c += d.c; + c.d += d.d; + + a.a += one.a; + a.b += one.b; + a.c += one.c; + a.d += one.d; + + return e; +} + +void main (void) +{ + sabcd a = sabcd(1.0, 1.0, 1.0, 1.0); + sabcd b = sabcd(2.0, 2.0, 2.0, 2.0); + sabcd c = sabcd(3.0, 3.0, 3.0, 3.0); + sabcd d = sabcd(4.0, 4.0, 4.0, 4.0); + sabcd e = sabcd(1.0, 1.0, 1.0, 1.0); + sabcd f = sabcd(0.0, 0.0, 0.0, 0.0); + sabcd one = sabcd(1.0, 1.0, 1.0, 1.0); + sabcd four = sabcd(4.0, 4.0, 4.0, 4.0); + sabcd seven = sabcd(7.0, 7.0, 7.0, 7.0); + float q = 0.0; + float q2 = 0.0; + + f = qualifiers(a, b, c, d, e); + + if(a == one) q += 1.0; + if(b == one) q += 2.0; + if(c == seven) q += 4.0; + if(d == four) q2 += 1.0; + if(e == one) q2 += 2.0; + if(f == one) q2 += 4.0; + + gl_FragColor = vec4(vec2(q / 7.0, q2 / 7.0), 1.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_struct_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_struct_vert.vert new file mode 100644 index 0000000000..201f3f5eff --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/qualifiers_struct_vert.vert @@ -0,0 +1,70 @@ + +/* +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; + + + +struct sabcd +{ + float a; + float b; + float c; + float d; +}; + + + +sabcd qualifiers(in sabcd a, out sabcd b, inout sabcd c, const in sabcd d, +sabcd e) +{ + sabcd one = sabcd(1.0, 1.0, 1.0, 1.0); + + b = a; + + c.a += d.a; + c.b += d.b; + c.c += d.c; + c.d += d.d; + + a.a += one.a; + a.b += one.b; + a.c += one.c; + a.d += one.d; + + return e; +} + +void main (void) +{ + sabcd a = sabcd(1.0, 1.0, 1.0, 1.0); + sabcd b = sabcd(2.0, 2.0, 2.0, 2.0); + sabcd c = sabcd(3.0, 3.0, 3.0, 3.0); + sabcd d = sabcd(4.0, 4.0, 4.0, 4.0); + sabcd e = sabcd(1.0, 1.0, 1.0, 1.0); + sabcd f = sabcd(0.0, 0.0, 0.0, 0.0); + sabcd one = sabcd(1.0, 1.0, 1.0, 1.0); + sabcd four = sabcd(4.0, 4.0, 4.0, 4.0); + sabcd seven = sabcd(7.0, 7.0, 7.0, 7.0); + float q = 0.0; + float q2 = 0.0; + + f = qualifiers(a, b, c, d, e); + + if(a == one) q += 1.0; + if(b == one) q += 2.0; + if(c == seven) q += 4.0; + if(d == four) q2 += 1.0; + if(e == one) q2 += 2.0; + if(f == one) q2 += 4.0; + + color = vec4(vec2(q / 7.0, q2 / 7.0), 1.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag new file mode 100644 index 0000000000..26ffd695ed --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +vec4 function(vec4 par[3]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[3], const in vec4 value); +void set_all(out vec4 array[3], const in vec4 value); + +void main (void) +{ + vec4 par[3]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +vec4 function(vec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0))) + { + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[3], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[3], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert new file mode 100644 index 0000000000..3c83eade81 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +vec4 function(vec4 par[3]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[3], const in vec4 value); +void set_all(out vec4 array[3], const in vec4 value); + +void main (void) +{ + vec4 par[3]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +vec4 function(vec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0))) + { + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[3], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[3], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag new file mode 100644 index 0000000000..ca027ab8de --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +vec4 function(vec4 par); +bool is_all(const in vec4 par, const in float value); +void set_all(out vec4 par, const in float value); + +void main (void) +{ + vec4 par = vec4(1.0, 1.0, 1.0, 1.0); + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +vec4 function(vec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 par, const in float value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_vert.vert new file mode 100644 index 0000000000..2f714a5728 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_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; + +// Function declaration. +vec4 function(vec4 par); +bool is_all(const in vec4 par, const in float value); +void set_all(out vec4 par, const in float value); + +void main (void) +{ + vec4 par = vec4(1.0, 1.0, 1.0, 1.0); + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +vec4 function(vec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 par, const in float value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag new file mode 100644 index 0000000000..23258c69b3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +vec4 function(in vec4 par[3]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[3], const in vec4 value); +void set_all(out vec4 array[3], const in vec4 value); + +void main (void) +{ + vec4 par[3]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +vec4 function(in vec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0))) + { + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[3], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[3], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert new file mode 100644 index 0000000000..3618544577 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +vec4 function(in vec4 par[3]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[3], const in vec4 value); +void set_all(out vec4 array[3], const in vec4 value); + +void main (void) +{ + vec4 par[3]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +vec4 function(in vec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0))) + { + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[3], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[3], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag new file mode 100644 index 0000000000..6e94bd9ed5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +vec4 function(in vec4 par); +bool is_all(const in vec4 par, const in float value); +void set_all(out vec4 par, const in float value); + +void main (void) +{ + vec4 par = vec4(1.0, 1.0, 1.0, 1.0); + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +vec4 function(in vec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 par, const in float value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_vert.vert new file mode 100644 index 0000000000..58bed576b5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_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; + +// Function declaration. +vec4 function(in vec4 par); +bool is_all(const in vec4 par, const in float value); +void set_all(out vec4 par, const in float value); + +void main (void) +{ + vec4 par = vec4(1.0, 1.0, 1.0, 1.0); + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should remain unchanged by the function and the function should return 1.0. + if(is_all(par, 1.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +vec4 function(in vec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 par, const in float value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag new file mode 100644 index 0000000000..1569b5639e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +vec4 function(inout vec4 par[3]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[3], const in vec4 value); +void set_all(out vec4 array[3], const in vec4 value); + +void main (void) +{ + vec4 par[3]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +vec4 function(inout vec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0))) + { + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[3], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[3], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert new file mode 100644 index 0000000000..dc547134dd --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert @@ -0,0 +1,91 @@ + +/* +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; + +// Function declarations. +vec4 function(inout vec4 par[3]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[3], const in vec4 value); +void set_all(out vec4 array[3], const in vec4 value); + +void main (void) +{ + vec4 par[3]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +vec4 function(inout vec4 par[3]) +{ + // Return the value of the array. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0))) + { + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[3], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[3], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag new file mode 100644 index 0000000000..1b1a81cc09 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag @@ -0,0 +1,112 @@ + +/* +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; + +// Function declarations. +vec4 function(inout vec4 par[10]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[10], const in vec4 value); +void set_all(out vec4 array[10], const in vec4 value); + +void main (void) +{ + vec4 par[10]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +vec4 function(inout vec4 par[10]) +{ + // Return the value of the array. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0))) + { + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[10], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + if(array[3] != value) + ret = false; + if(array[4] != value) + ret = false; + if(array[5] != value) + ret = false; + if(array[6] != value) + ret = false; + if(array[7] != value) + ret = false; + if(array[8] != value) + ret = false; + if(array[9] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[10], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; + array[3] = value; + array[4] = value; + array[5] = value; + array[6] = value; + array[7] = value; + array[8] = value; + array[9] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert new file mode 100644 index 0000000000..e7e57e376b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert @@ -0,0 +1,112 @@ + +/* +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; + +// Function declarations. +vec4 function(inout vec4 par[10]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[10], const in vec4 value); +void set_all(out vec4 array[10], const in vec4 value); + +void main (void) +{ + vec4 par[10]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +vec4 function(inout vec4 par[10]) +{ + // Return the value of the array. + if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0))) + { + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[10], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + if(array[3] != value) + ret = false; + if(array[4] != value) + ret = false; + if(array[5] != value) + ret = false; + if(array[6] != value) + ret = false; + if(array[7] != value) + ret = false; + if(array[8] != value) + ret = false; + if(array[9] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[10], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; + array[3] = value; + array[4] = value; + array[5] = value; + array[6] = value; + array[7] = value; + array[8] = value; + array[9] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag new file mode 100644 index 0000000000..1d144cac57 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +// Function declaration. +vec4 function(inout vec4 par); +bool is_all(const in vec4 par, const in float value); +void set_all(out vec4 par, const in float value); + +void main (void) +{ + vec4 par = vec4(1.0, 1.0, 1.0, 1.0); + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +vec4 function(inout vec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 par, const in float value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_vert.vert new file mode 100644 index 0000000000..e4e75320f8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_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; + +// Function declaration. +vec4 function(inout vec4 par); +bool is_all(const in vec4 par, const in float value); +void set_all(out vec4 par, const in float value); + +void main (void) +{ + vec4 par = vec4(1.0, 1.0, 1.0, 1.0); + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +vec4 function(inout vec4 par) +{ + // Return the value of the parameter. + if(is_all(par, 1.0)) + { + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return vec4(1.0, 1.0, 1.0, 1.0); + } + else + return vec4(0.0, 0.0, 0.0, 0.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 par, const in float value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag new file mode 100644 index 0000000000..4968a7eb24 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag @@ -0,0 +1,85 @@ + +/* +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; + +// Function declarations. +vec4 function(out vec4 par[3]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[3], const in vec4 value); +void set_all(out vec4 array[3], const in vec4 value); + +void main (void) +{ + vec4 par[3]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definitions. +vec4 function(out vec4 par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[3], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[3], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert new file mode 100644 index 0000000000..125a40f979 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert @@ -0,0 +1,85 @@ + +/* +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; + +// Function declarations. +vec4 function(out vec4 par[3]); +bool is_all(const in vec4 par, const in float value); +bool is_all(const in vec4 array[3], const in vec4 value); +void set_all(out vec4 array[3], const in vec4 value); + +void main (void) +{ + vec4 par[3]; + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + // Initialize the entire array to 1.0. + set_all(par, vec4(1.0, 1.0, 1.0, 1.0)); + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definitions. +vec4 function(out vec4 par[3]) +{ + // Test parameter qualifier (default is "in"). + set_all(par, vec4(0.0, 0.0, 0.0, 0.0)); + + return vec4(1.0, 1.0, 1.0, 1.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +bool is_all(const in vec4 array[3], const in vec4 value) +{ + bool ret = true; + + if(array[0] != value) + ret = false; + if(array[1] != value) + ret = false; + if(array[2] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 array[3], const in vec4 value) +{ + array[0] = value; + array[1] = value; + array[2] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag new file mode 100644 index 0000000000..ee357ab5a3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +vec4 function(out vec4 par); +bool is_all(const in vec4 par, const in float value); +void set_all(out vec4 par, const in float value); + +void main (void) +{ + vec4 par = vec4(1.0, 1.0, 1.0, 1.0); + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +vec4 function(out vec4 par) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return vec4(1.0, 1.0, 1.0, 1.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 par, const in float value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert new file mode 100644 index 0000000000..c26956cf07 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert @@ -0,0 +1,68 @@ + +/* +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; + +// Function declaration. +vec4 function(out vec4 par); +bool is_all(const in vec4 par, const in float value); +void set_all(out vec4 par, const in float value); + +void main (void) +{ + vec4 par = vec4(1.0, 1.0, 1.0, 1.0); + vec4 ret = vec4(0.0, 0.0, 0.0, 0.0); + + float gray = 0.0; + + ret = function(par); + + // The parameter should be changed by the function and the function should return 1.0. + if(is_all(par, 0.0) && is_all(ret, 1.0)) + { + gray = 1.0; + } + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +vec4 function(out vec4 par) +{ + // Test parameter qualifier (default is "in"). + set_all(par, 0.0); + + return vec4(1.0, 1.0, 1.0, 1.0); +} + +bool is_all(const in vec4 par, const in float value) +{ + bool ret = true; + + if(par[0] != value) + ret = false; + if(par[1] != value) + ret = false; + if(par[2] != value) + ret = false; + if(par[3] != value) + ret = false; + + return ret; +} + +void set_all(out vec4 par, const in float value) +{ + par[0] = value; + par[1] = value; + par[2] = value; + par[3] = value; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag new file mode 100644 index 0000000000..cb277863d0 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag @@ -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. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +float gray = 0.0; + +// Function declaration. +void function(void); + +void main (void) +{ + gray = 0.0; + + function(); + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} + +// Function definition. +void function(void) +{ + gray = 1.0; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/void_empty_empty_void_empty_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/void_empty_empty_void_empty_vert.vert new file mode 100644 index 0000000000..8f5130c26e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/functions/void_empty_empty_void_empty_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_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +float gray = 0.0; + +// Function declaration. +void function(void); + +void main (void) +{ + gray = 0.0; + + function(); + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} + +// Function definition. +void function(void) +{ + gray = 1.0; +} |