diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct')
64 files changed, 3757 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/input.run.txt new file mode 100644 index 0000000000..89c3da16ec --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/input.run.txt @@ -0,0 +1,8 @@ +# this file is auto-generated. DO NOT EDIT. +struct_001_to_008.html +struct_009_to_016.html +struct_017_to_024.html +struct_025_to_032.html +struct_033_to_040.html +struct_041_to_048.html +struct_049_to_056.html diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag new file mode 100644 index 0000000000..bc0fdd01a8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag @@ -0,0 +1,99 @@ + +/* +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; + +#define ERROR_EPSILON 0.125 + +void main (void){ + struct second_nest + { + float sc_nt; + mat2 sc_mt2; + vec4 sc_vc4; + }; + + struct nest + { + ivec3 nt_ivc3; + bvec4 nt_bvc4; + second_nest nt_scne; + }; + + struct test_t + { + float t_fl; + vec2 t_vc2; + vec3 t_vc3; + mat4 t_mt4; + nest t_nested; + float t_2fl; + }; + + vec4 mt1 = vec4(31.0, 32.0, 33.0, 34.0); + vec4 mt2 = vec4(35.0, 36.0, 37.0, 38.0); + vec4 mt3 = vec4(39.0, 40.0, 41.0, 42.0); + vec4 mt4 = vec4(43.0, 44.0, 45.0, 46.0); + int i=0; + float sum1=0.0, sum2=0.0, sum3=0.0, sum4=0.0; + + test_t a = test_t(23.0, vec2(12.0, 13.0), + + vec3(163.0, 173.0, 183.0), + + mat4(mt1, mt2, mt3, mt4), + + nest( ivec3(73, 74, 75), + + bvec4(12, 0, 17.0, 193.0 ), + + second_nest(144.0, mat2(22.0, 23.0, 24.0, 25.0), vec4(57.0, 58.0, 59.0, 60.0 ) + ) + ), + + 203.0 + ); + + sum1 = a.t_mt4[0][0] + a.t_mt4[0][1] + a.t_mt4[0][2] + a.t_mt4[0][3]; + sum2 = a.t_mt4[1][0] + a.t_mt4[1][1] + a.t_mt4[1][2] + a.t_mt4[1][3]; + sum3 = a.t_mt4[2][0] + a.t_mt4[2][1] + a.t_mt4[2][2] + a.t_mt4[2][3]; + sum4 = a.t_mt4[3][0] + a.t_mt4[3][1] + a.t_mt4[3][2] + a.t_mt4[3][3]; + + float gray; + if( ( a.t_fl == 23.0 ) && + + (a.t_vc2[0] == 12.0) && (a.t_vc2[1] == 13.0) && + + (a.t_vc3[0] == 163.0) && (a.t_vc3[1] == 173.0) && (a.t_vc3[2] == 183.0) && + + (sum1 > 130.0-ERROR_EPSILON && sum1 < 130.0+ERROR_EPSILON ) && (sum2 > 146.0-ERROR_EPSILON && sum2 < 146.0+ERROR_EPSILON ) && (sum3 >162.0-ERROR_EPSILON && sum3 < 162.0+ERROR_EPSILON ) && (sum4 > 178.0-ERROR_EPSILON && sum4 < 178.0+ERROR_EPSILON ) && + (a.t_nested.nt_ivc3[0] == 73 ) && (a.t_nested.nt_ivc3[1] == 74 ) && (a.t_nested.nt_ivc3[2] == 75 ) && + + (a.t_nested.nt_bvc4[0] == true) && (a.t_nested.nt_bvc4[1] == false) && + + (a.t_nested.nt_bvc4[2] == true ) && (a.t_nested.nt_bvc4[0] == true) && + + (a.t_nested.nt_scne.sc_nt == 144.0) && + + (a.t_nested.nt_scne.sc_mt2[0][0] == 22.0 ) && (a.t_nested.nt_scne.sc_mt2[0][1] == 23.0 ) && + + (a.t_nested.nt_scne.sc_mt2[1][0] == 24.0 ) && (a.t_nested.nt_scne.sc_mt2[1][1] == 25.0 ) && + + (a.t_nested.nt_scne.sc_vc4[0] == 57.0 ) && (a.t_nested.nt_scne.sc_vc4[1] == 58.0 ) && + + (a.t_nested.nt_scne.sc_vc4[2] == 59.0 ) && (a.t_nested.nt_scne.sc_vc4[3] == 60.0) && + + (a.t_2fl == 203.0) + ) + gray=1.0; + else gray=0.0; + gl_FragColor = vec4(gray, gray, gray, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert new file mode 100644 index 0000000000..32cf5252f2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert @@ -0,0 +1,102 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +#define ERROR_EPSILON 0.125 + +void main (void) +{ + struct second_nest + { + float sc_nt; + mat2 sc_mt2; + vec4 sc_vc4; + }; + + struct nest + { + ivec3 nt_ivc3; + bvec4 nt_bvc4; + second_nest nt_scne; + }; + + struct test_t + { + float t_fl; + vec2 t_vc2; + vec3 t_vc3; + mat4 t_mt4; + nest t_nested; + float t_2fl; + }; + + vec4 mt1 = vec4(31.0, 32.0, 33.0, 34.0); + vec4 mt2 = vec4(35.0, 36.0, 37.0, 38.0); + vec4 mt3 = vec4(39.0, 40.0, 41.0, 42.0); + vec4 mt4 = vec4(43.0, 44.0, 45.0, 46.0); + int i=0; + float sum1=0.0, sum2=0.0, sum3=0.0, sum4=0.0; + + test_t a = test_t(23.0, vec2(12.0, 13.0), + + vec3(163.0, 173.0, 183.0), + + mat4(mt1, mt2, mt3, mt4), + + nest( ivec3(73, 74, 75), + + bvec4(12, 0, 17.0, 193.0 ), + + second_nest(144.0, mat2(22.0, 23.0, 24.0, 25.0), vec4(57.0, 58.0, 59.0, 60.0 ) + ) + ), + + 203.0 + ); + + sum1 = a.t_mt4[0][0] + a.t_mt4[0][1] + a.t_mt4[0][2] + a.t_mt4[0][3]; + sum2 = a.t_mt4[1][0] + a.t_mt4[1][1] + a.t_mt4[1][2] + a.t_mt4[1][3]; + sum3 = a.t_mt4[2][0] + a.t_mt4[2][1] + a.t_mt4[2][2] + a.t_mt4[2][3]; + sum4 = a.t_mt4[3][0] + a.t_mt4[3][1] + a.t_mt4[3][2] + a.t_mt4[3][3]; + + float gray; + if( ( a.t_fl == 23.0 ) && + + (a.t_vc2[0] == 12.0) && (a.t_vc2[1] == 13.0) && + + (a.t_vc3[0] == 163.0) && (a.t_vc3[1] == 173.0) && (a.t_vc3[2] == 183.0) && + + (sum1 > 130.0-ERROR_EPSILON && sum1 < 130.0+ERROR_EPSILON ) && (sum2 > 146.0-ERROR_EPSILON && sum2 < 146.0+ERROR_EPSILON ) && (sum3 >162.0-ERROR_EPSILON && sum3 < 162.0+ERROR_EPSILON ) && (sum4 > 178.0-ERROR_EPSILON && sum4 < 178.0+ERROR_EPSILON ) && + (a.t_nested.nt_ivc3[0] == 73 ) && (a.t_nested.nt_ivc3[1] == 74 ) && (a.t_nested.nt_ivc3[2] == 75 ) && + + (a.t_nested.nt_bvc4[0] == true) && (a.t_nested.nt_bvc4[1] == false) && + + (a.t_nested.nt_bvc4[2] == true ) && (a.t_nested.nt_bvc4[0] == true) && + + (a.t_nested.nt_scne.sc_nt == 144.0) && + + (a.t_nested.nt_scne.sc_mt2[0][0] == 22.0 ) && (a.t_nested.nt_scne.sc_mt2[0][1] == 23.0 ) && + + (a.t_nested.nt_scne.sc_mt2[1][0] == 24.0 ) && (a.t_nested.nt_scne.sc_mt2[1][1] == 25.0 ) && + + (a.t_nested.nt_scne.sc_vc4[0] == 57.0 ) && (a.t_nested.nt_scne.sc_vc4[1] == 58.0 ) && + + (a.t_nested.nt_scne.sc_vc4[2] == 59.0 ) && (a.t_nested.nt_scne.sc_vc4[3] == 60.0) && + + (a.t_2fl == 203.0) + ) + gray=1.0; + else gray=0.0; + + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; + +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_001_to_008.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_001_to_008.html new file mode 100644 index 0000000000..226e152da8 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_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: struct_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": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "struct_float_frag.frag" + }, + "name": "struct_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": "struct_float_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_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": "structcopy_float_frag.frag" + }, + "name": "structcopy_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": "structcopy_float_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_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": "structnest_float_frag.frag" + }, + "name": "structnest_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": "structnest_float_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_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": "struct_bool_frag.frag" + }, + "name": "struct_bool_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": "struct_bool_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_bool_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_009_to_016.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_009_to_016.html new file mode 100644 index 0000000000..aacd4526e2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_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: struct_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": "structcopy_bool_frag.frag" + }, + "name": "structcopy_bool_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": "structcopy_bool_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_bool_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": "structnest_bool_frag.frag" + }, + "name": "structnest_bool_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": "structnest_bool_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_bool_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": "struct_vec2_frag.frag" + }, + "name": "struct_vec2_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": "struct_vec2_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_vec2_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": "structcopy_vec2_frag.frag" + }, + "name": "structcopy_vec2_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": "structcopy_vec2_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_vec2_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_017_to_024.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_017_to_024.html new file mode 100644 index 0000000000..c04ca16563 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_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: struct_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": "structnest_vec2_frag.frag" + }, + "name": "structnest_vec2_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": "structnest_vec2_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_vec2_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": "struct_vec3_frag.frag" + }, + "name": "struct_vec3_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": "struct_vec3_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_vec3_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": "structcopy_vec3_frag.frag" + }, + "name": "structcopy_vec3_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": "structcopy_vec3_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_vec3_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": "structnest_vec3_frag.frag" + }, + "name": "structnest_vec3_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": "structnest_vec3_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_vec3_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_025_to_032.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_025_to_032.html new file mode 100644 index 0000000000..cbbc42181b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_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: struct_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": "struct_vec4_frag.frag" + }, + "name": "struct_vec4_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": "struct_vec4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_vec4_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": "structcopy_vec4_frag.frag" + }, + "name": "structcopy_vec4_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": "structcopy_vec4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_vec4_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": "structnest_vec4_frag.frag" + }, + "name": "structnest_vec4_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": "structnest_vec4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_vec4_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": "struct_bvec2bvec3bvec4_frag.frag" + }, + "name": "struct_bvec2bvec3bvec4_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": "struct_bvec2bvec3bvec4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_bvec2bvec3bvec4_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_033_to_040.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_033_to_040.html new file mode 100644 index 0000000000..3fa57169f4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_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: struct_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": "structcopy_bvec2bvec3bvec4_frag.frag" + }, + "name": "structcopy_bvec2bvec3bvec4_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": "structcopy_bvec2bvec3bvec4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_bvec2bvec3bvec4_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": "structnest_bvec2bvec3bvec4_frag.frag" + }, + "name": "structnest_bvec2bvec3bvec4_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": "structnest_bvec2bvec3bvec4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_bvec2bvec3bvec4_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": "struct_mat2_frag.frag" + }, + "name": "struct_mat2_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": "struct_mat2_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_mat2_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": "structcopy_mat2_frag.frag" + }, + "name": "structcopy_mat2_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": "structcopy_mat2_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_mat2_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_041_to_048.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_041_to_048.html new file mode 100644 index 0000000000..7cc87e2f57 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_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: struct_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": "structnest_mat2_frag.frag" + }, + "name": "structnest_mat2_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": "structnest_mat2_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_mat2_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": "struct_mat3_frag.frag" + }, + "name": "struct_mat3_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": "struct_mat3_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_mat3_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": "structcopy_mat3_frag.frag" + }, + "name": "structcopy_mat3_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": "structcopy_mat3_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_mat3_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": "structnest_mat3_frag.frag" + }, + "name": "structnest_mat3_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": "structnest_mat3_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_mat3_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_049_to_056.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_049_to_056.html new file mode 100644 index 0000000000..9356340e4d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_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: struct_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": "struct_mat4_frag.frag" + }, + "name": "struct_mat4_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": "struct_mat4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "struct_mat4_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": "structcopy_mat4_frag.frag" + }, + "name": "structcopy_mat4_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": "structcopy_mat4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structcopy_mat4_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": "structnest_mat4_frag.frag" + }, + "name": "structnest_mat4_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": "structnest_mat4_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "structnest_mat4_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": "nestedstructcomb_various_frag.frag" + }, + "name": "nestedstructcomb_various_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": "nestedstructcomb_various_vert.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "nestedstructcomb_various_vert.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bool_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bool_frag.frag new file mode 100644 index 0000000000..88affd9767 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bool_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 +struct sabcd +{ + bool a; + bool b; + bool c; + bool d; +}; + + + +void main (void) +{ + sabcd s = sabcd(bool(12), bool(0), bool(25.5), bool(0.0)); + float gray = 0.0; + if( (s.a==true) && (s.b==false) && (s.c == true) && (s.d==false)) + gray=1.0; + else + gray =0.0; + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bool_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bool_vert.vert new file mode 100644 index 0000000000..0a3b81b46d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bool_vert.vert @@ -0,0 +1,35 @@ + +/* +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 +{ + bool a; + bool b; + bool c; + bool d; +}; + + + +void main (void) +{ + sabcd s = sabcd(bool(12), bool(0), bool(25.5), bool(0.0)); + float gray = 0.0; + if( (s.a==true) && (s.b==false) && (s.c == true) && (s.d==false)) + gray=1.0; + else + gray =0.0; + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag new file mode 100644 index 0000000000..1f8c7cfb6a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag @@ -0,0 +1,29 @@ + +/* +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 +{ + bvec2 a; + bvec3 b; + bvec4 c; +}; + +void main (void) +{ + sabcd s = sabcd( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ) ); + float gray = 0.0; + if( (s.a[0]) && (s.a[1]) && (s.b[0]) && (!s.b[1]) && (s.b[2]) && (s.c[0]) && (s.c[1]) && (s.c[2]) ) + gray=1.0; + else + gray =0.0; + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert new file mode 100644 index 0000000000..f82612477d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert @@ -0,0 +1,30 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct sabcd +{ + bvec2 a; + bvec3 b; + bvec4 c; +}; + +void main (void) +{ + sabcd s = sabcd( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ) ); + float gray = 0.0; + if( (s.a[0]) && (s.a[1]) && (s.b[0]) && (!s.b[1]) && (s.b[2]) && (s.c[0]) && (s.c[1]) && (s.c[2]) ) + gray=1.0; + else + gray =0.0; + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_float_frag.frag new file mode 100644 index 0000000000..50c29bf575 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_float_frag.frag @@ -0,0 +1,26 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct sabcd +{ + float a; + float b; + float c; + float d; +}; + + + +void main (void) +{ + sabcd s = sabcd(1.0, 2.0, 4.0, 8.0); + gl_FragColor = vec4(vec3((s.a + s.b + s.c + s.d) / 15.0), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_float_vert.vert new file mode 100644 index 0000000000..27ad8c0fde --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_float_vert.vert @@ -0,0 +1,30 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + + + +struct sabcd +{ + float a; + float b; + float c; + float d; +}; + + + +void main (void) +{ + sabcd s = sabcd(1.0, 2.0, 4.0, 8.0); + color = vec4(vec3((s.a + s.b + s.c + s.d) / 15.0), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat2_frag.frag new file mode 100644 index 0000000000..043c948f4d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat2_frag.frag @@ -0,0 +1,23 @@ + +/* +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; + +struct sabcd +{ + mat2 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat2(12.0, 29.0, 13.0, 26.0) ); + gl_FragColor = vec4( vec3( (s.a[0][0] + s.a[0][1] + s.a[1][0] + s.a[1][1]) / 80.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat2_vert.vert new file mode 100644 index 0000000000..6298630d07 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat2_vert.vert @@ -0,0 +1,23 @@ + +/* +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 +{ + mat2 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat2(12.0, 29.0, 13.0, 26.0) ); + color = vec4( vec3( (s.a[0][0] + s.a[0][1] + s.a[1][0] + s.a[1][1]) / 80.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat3_frag.frag new file mode 100644 index 0000000000..1caa22aa7b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat3_frag.frag @@ -0,0 +1,36 @@ + +/* +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; + +struct sabcd +{ + mat3 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat3(12.0, 29.0, 13.0, 26.0, 71.0, 63.0, 90.0, 118.0, 128.0) ); + float sum=0.0; + int i,j; + + sum = sum + s.a[0][0]; + sum = sum + s.a[0][1]; + sum = sum + s.a[0][2]; + sum = sum + s.a[1][0]; + sum = sum + s.a[1][1]; + sum = sum + s.a[1][2]; + sum = sum + s.a[2][0]; + sum = sum + s.a[2][1]; + sum = sum + s.a[2][2]; + + gl_FragColor = vec4( vec3( sum / 550.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat3_vert.vert new file mode 100644 index 0000000000..f2880dc29d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat3_vert.vert @@ -0,0 +1,37 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct sabcd +{ + mat3 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat3(12.0, 29.0, 13.0, 26.0, 71.0, 63.0, 90.0, 118.0, 128.0) ); + float sum=0.0; + + sum = sum + s.a[0][0]; + sum = sum + s.a[0][1]; + sum = sum + s.a[0][2]; + + sum = sum + s.a[1][0]; + sum = sum + s.a[1][1]; + sum = sum + s.a[1][2]; + + sum = sum + s.a[2][0]; + sum = sum + s.a[2][1]; + sum = sum + s.a[2][2]; + + color = vec4( vec3( sum / 550.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat4_frag.frag new file mode 100644 index 0000000000..bfb6fe1918 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat4_frag.frag @@ -0,0 +1,46 @@ + +/* +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; + +struct sabcd +{ + mat4 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat4(12.0, 29.0, 13.0, 26.0, + 71.0, 63.0, 90.0, 118.0, + 128.0, 44.0, 57.0, 143.0, + 151.0, 14.0, 15.0, 21.0 ) ); + float sum=0.0; + int i,j; + + sum = sum + s.a[0][0]; + sum = sum + s.a[0][1]; + sum = sum + s.a[0][2]; + sum = sum + s.a[0][3]; + sum = sum + s.a[1][0]; + sum = sum + s.a[1][1]; + sum = sum + s.a[1][2]; + sum = sum + s.a[1][3]; + sum = sum + s.a[2][0]; + sum = sum + s.a[2][1]; + sum = sum + s.a[2][2]; + sum = sum + s.a[2][3]; + sum = sum + s.a[3][0]; + sum = sum + s.a[3][1]; + sum = sum + s.a[3][2]; + sum = sum + s.a[3][3]; + + gl_FragColor = vec4( vec3( sum / 995.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat4_vert.vert new file mode 100644 index 0000000000..5f21dea131 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_mat4_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; + +struct sabcd +{ + mat4 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat4(12.0, 29.0, 13.0, 26.0, + 71.0, 63.0, 90.0, 118.0, + 128.0, 44.0, 57.0, 143.0, + 151.0, 14.0, 15.0, 21.0 ) ); + float sum=0.0; + + sum = sum + s.a[0][0]; + sum = sum + s.a[0][1]; + sum = sum + s.a[0][2]; + sum = sum + s.a[0][3]; + + sum = sum + s.a[1][0]; + sum = sum + s.a[1][1]; + sum = sum + s.a[1][2]; + sum = sum + s.a[1][3]; + + sum = sum + s.a[2][0]; + sum = sum + s.a[2][1]; + sum = sum + s.a[2][2]; + sum = sum + s.a[2][3]; + + sum = sum + s.a[3][0]; + sum = sum + s.a[3][1]; + sum = sum + s.a[3][2]; + sum = sum + s.a[3][3]; + + color = vec4( vec3( sum / 995.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec2_frag.frag new file mode 100644 index 0000000000..1e8e54360d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec2_frag.frag @@ -0,0 +1,24 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct sabcd +{ + vec2 a; + vec2 b; +}; + + +void main (void) +{ + sabcd s = sabcd(vec2(12.0, 29.0), vec2(13.0, 26.0) ); + + gl_FragColor = vec4( vec3( (s.a[0] + s.a[1] + s.b[0] + s.b[1]) / 80.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec2_vert.vert new file mode 100644 index 0000000000..b7c7588767 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec2_vert.vert @@ -0,0 +1,28 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + + + +struct sabcd +{ + vec2 a; + vec2 b; +}; + + + +void main (void) +{ + sabcd s = sabcd(vec2(12.0, 29.0), vec2(13.0, 26.0) ); + color = vec4( vec3( (s.a[0] + s.a[1] + s.b[0] + s.b[1]) / 80.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec3_frag.frag new file mode 100644 index 0000000000..aba8516a94 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec3_frag.frag @@ -0,0 +1,24 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct sabcd +{ + vec3 a; + vec3 b; +}; + + +void main (void) +{ + sabcd s = sabcd(vec3(12.0, 29.0, 32.0), vec3(13.0, 26.0, 38.0 ) ); + + gl_FragColor = vec4( vec3( (s.a[0] + s.a[1] + s.a[2] + s.b[0] + s.b[1] + s.b[2]) / 150.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec3_vert.vert new file mode 100644 index 0000000000..09c5bb54c2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec3_vert.vert @@ -0,0 +1,28 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + + + +struct sabcd +{ + vec3 a; + vec3 b; +}; + + + +void main (void) +{ + sabcd s = sabcd(vec3(12.0, 29.0, 32.0), vec3(13.0, 26.0, 38.0 ) ); + color = vec4( vec3( (s.a[0] + s.a[1] + s.a[2] + s.b[0] + s.b[1] + s.b[2]) / 150.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec4_frag.frag new file mode 100644 index 0000000000..3d03168955 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec4_frag.frag @@ -0,0 +1,24 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +struct sabcd +{ + vec4 a; + vec4 b; +}; + +void main (void) +{ + sabcd s = sabcd(vec4(12.0, 29.0, 32.0, 47.0), vec4(13.0, 26.0, 38.0, 53.0 ) ); + gl_FragColor = vec4( vec3( (s.a[0] + s.a[1] + s.a[2] + s.a[3] + s.b[0] + s.b[1] + s.b[2] + s.b[3]) / 250.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec4_vert.vert new file mode 100644 index 0000000000..3cd7d37047 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/struct_vec4_vert.vert @@ -0,0 +1,24 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct sabcd +{ + vec4 a; + vec4 b; +}; + +void main (void) +{ + sabcd s = sabcd(vec4(12.0, 29.0, 32.0, 47.0), vec4(13.0, 26.0, 38.0, 53.0 ) ); + color = vec4( vec3( (s.a[0] + s.a[1] + s.a[2] + s.a[3] + s.b[0] + s.b[1] + s.b[2] + s.b[3]) / 250.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bool_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bool_frag.frag new file mode 100644 index 0000000000..39e2a1054b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bool_frag.frag @@ -0,0 +1,33 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct sabcd +{ + bool a; + bool b; + bool c; + bool d; +}; + + + +void main (void) +{ + sabcd s1 = sabcd(bool(12), bool(0), bool(25.5), bool(0.0)); + sabcd s2 = sabcd(bool(0.0), bool(0.0), bool(0.0), bool(0.0)); + s2 = s1; + float gray = 0.0; + if( (s2.a==true) && (s2.b==false) && (s2.c == true) && (s2.d==false)) + gray=1.0; + else + gray =0.0; + gl_FragColor = vec4(gray,gray,gray,1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bool_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bool_vert.vert new file mode 100644 index 0000000000..7149f8848c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bool_vert.vert @@ -0,0 +1,38 @@ + +/* +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 +{ + bool a; + bool b; + bool c; + bool d; +}; + + + +void main (void) +{ + sabcd s1 = sabcd(bool(12), bool(0), bool(25.5), bool(0.0)); + sabcd s2 = sabcd(bool(0.0), bool(0.0), bool(0.0), bool(0.0)); + s2 = s1; + float gray = 0.0; + if( (s2.a==true) && (s2.b==false) && (s2.c == true) && (s2.d==false)) + gray=1.0; + else + gray =0.0; + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; + +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag new file mode 100644 index 0000000000..d30d390c81 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag @@ -0,0 +1,31 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct sabcd +{ + bvec2 a; + bvec3 b; + bvec4 c; +}; + +void main (void) +{ + sabcd s = sabcd( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ) ); + sabcd s2 = sabcd( bvec2(0, 0), bvec3(0.0, 0.0, 0.0), bvec4(0.0, 0.0, 0.0, 0.0 ) ); + s2 = s; + float gray = 0.0; + if( (s2.a[0]) && (s2.a[1]) && (s2.b[0]) && (!s2.b[1]) && (s2.b[2]) && (s2.c[0]) && (s2.c[1]) && (s2.c[2]) ) + gray=1.0; + else + gray =0.0; + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_vert.vert new file mode 100644 index 0000000000..24f3981d03 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_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; + +struct sabcd +{ + bvec2 a; + bvec3 b; + bvec4 c; +}; + +void main (void) +{ + sabcd s = sabcd( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ) ); + sabcd s2 = sabcd( bvec2(0, 0), bvec3(0.0, 0.0, 0.0), bvec4(0.0, 0.0, 0.0, 0.0 ) ); + s2 = s; + float gray = 0.0; + if( (s2.a[0]) && (s2.a[1]) && (s2.b[0]) && (!s2.b[1]) && (s2.b[2]) && (s2.c[0]) && (s2.c[1]) && (s2.c[2]) && (s2.c[3]) ) + gray=1.0; + else + gray =0.0; + color = vec4(gray, gray, gray, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_float_frag.frag new file mode 100644 index 0000000000..de34d38e48 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_float_frag.frag @@ -0,0 +1,28 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct sabcd +{ + float a; + float b; + float c; + float d; +}; + + + +void main (void) +{ + sabcd s = sabcd(1.0, 2.0, 4.0, 8.0); + sabcd s2 = sabcd(0.0, 0.0, 0.0, 0.0); + s2 = s; + gl_FragColor = vec4((s.a + s.b + s.c + s.d) / 15.0, (s2.a + s2.b + s2.c + s2.d) / 15.0, 1.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_float_vert.vert new file mode 100644 index 0000000000..baf2c7afe7 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_float_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; + + + +struct sabcd +{ + float a; + float b; + float c; + float d; +}; + + + +void main (void) +{ + sabcd s = sabcd(1.0, 2.0, 4.0, 8.0); + sabcd s2 = sabcd(0.0, 0.0, 0.0, 0.0); + s2 = s; + color = vec4((s.a + s.b + s.c + s.d) / 15.0, (s2.a + s2.b + s2.c + s2.d) / 15.0, 1.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat2_frag.frag new file mode 100644 index 0000000000..78de99d99b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat2_frag.frag @@ -0,0 +1,25 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +struct sabcd +{ + mat2 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat2(12.0, 29.0, 13.0, 26.0) ); + sabcd s2 = sabcd(mat2(0.0, 0.0, 0.0, 0.0) ); + s2 = s; + gl_FragColor = vec4( vec3( (s2.a[0][0] + s2.a[0][1] + s2.a[1][0] + s2.a[1][1]) / 80.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat2_vert.vert new file mode 100644 index 0000000000..1f7222178a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat2_vert.vert @@ -0,0 +1,25 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct sabcd +{ + mat2 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat2(12.0, 29.0, 13.0, 26.0) ); + sabcd s2 = sabcd(mat2(0.0, 0.0, 0.0, 0.0) ); + s2 = s; + color = vec4( vec3( (s2.a[0][0] + s2.a[0][1] + s2.a[1][0] + s2.a[1][1]) / 80.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat3_frag.frag new file mode 100644 index 0000000000..fe7c54f2e2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat3_frag.frag @@ -0,0 +1,38 @@ + +/* +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; + +struct sabcd +{ + mat3 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat3(12.0, 29.0, 13.0, 26.0, 71.0, 63.0, 90.0, 118.0, 128.0) ); + sabcd s2 = sabcd(mat3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ); + s2 = s; + float sum=0.0; + int i,j; + + sum = sum + s2.a[0][0]; + sum = sum + s2.a[0][1]; + sum = sum + s2.a[0][2]; + sum = sum + s2.a[1][0]; + sum = sum + s2.a[1][1]; + sum = sum + s2.a[1][2]; + sum = sum + s2.a[2][0]; + sum = sum + s2.a[2][1]; + sum = sum + s2.a[2][2]; + + gl_FragColor = vec4( vec3( sum / 550.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat3_vert.vert new file mode 100644 index 0000000000..c836dc75eb --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat3_vert.vert @@ -0,0 +1,39 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct sabcd +{ + mat3 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat3(12.0, 29.0, 13.0, 26.0, 71.0, 63.0, 90.0, 118.0, 128.0) ); + sabcd s2 = sabcd(mat3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ); + s2 = s; + float sum=0.0; + + sum = sum + s2.a[0][0]; + sum = sum + s2.a[0][1]; + sum = sum + s2.a[0][2]; + + sum = sum + s2.a[1][0]; + sum = sum + s2.a[1][1]; + sum = sum + s2.a[1][2]; + + sum = sum + s2.a[2][0]; + sum = sum + s2.a[2][1]; + sum = sum + s2.a[2][2]; + + color = vec4( vec3( sum / 550.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat4_frag.frag new file mode 100644 index 0000000000..ab3c925fa9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat4_frag.frag @@ -0,0 +1,51 @@ + +/* +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; + +struct sabcd +{ + mat4 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat4(12.0, 29.0, 13.0, 26.0, + 71.0, 63.0, 90.0, 118.0, + 128.0, 44.0, 57.0, 143.0, + 151.0, 14.0, 15.0, 21.0 ) ); + sabcd s2 = sabcd(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 ) ); + s2 = s; + float sum=0.0; + int i,j; + + sum = sum + s2.a[0][0]; + sum = sum + s2.a[0][1]; + sum = sum + s2.a[0][2]; + sum = sum + s2.a[0][3]; + sum = sum + s2.a[1][0]; + sum = sum + s2.a[1][1]; + sum = sum + s2.a[1][2]; + sum = sum + s2.a[1][3]; + sum = sum + s2.a[2][0]; + sum = sum + s2.a[2][1]; + sum = sum + s2.a[2][2]; + sum = sum + s2.a[2][3]; + sum = sum + s2.a[3][0]; + sum = sum + s2.a[3][1]; + sum = sum + s2.a[3][2]; + sum = sum + s2.a[3][3]; + + gl_FragColor = vec4( vec3( sum / 995.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat4_vert.vert new file mode 100644 index 0000000000..fdb5a889fd --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_mat4_vert.vert @@ -0,0 +1,53 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct sabcd +{ + mat4 a; +}; + +void main (void) +{ + sabcd s = sabcd(mat4(12.0, 29.0, 13.0, 26.0, + 71.0, 63.0, 90.0, 118.0, + 128.0, 44.0, 57.0, 143.0, + 151.0, 14.0, 15.0, 21.0 ) ); + sabcd s2 = sabcd(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 ) ); + s2 = s; + float sum=0.0; + + sum = sum + s2.a[0][0]; + sum = sum + s2.a[0][1]; + sum = sum + s2.a[0][2]; + sum = sum + s2.a[0][3]; + + sum = sum + s2.a[1][0]; + sum = sum + s2.a[1][1]; + sum = sum + s2.a[1][2]; + sum = sum + s2.a[1][3]; + + sum = sum + s2.a[2][0]; + sum = sum + s2.a[2][1]; + sum = sum + s2.a[2][2]; + sum = sum + s2.a[2][3]; + + sum = sum + s2.a[3][0]; + sum = sum + s2.a[3][1]; + sum = sum + s2.a[3][2]; + sum = sum + s2.a[3][3]; + + color = vec4( vec3( sum / 995.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec2_frag.frag new file mode 100644 index 0000000000..9acaeaa23f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec2_frag.frag @@ -0,0 +1,25 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct sabcd +{ + vec2 a; + vec2 b; +}; + + +void main (void) +{ + sabcd s1 = sabcd(vec2(12.0, 29.0), vec2(13.0, 26.0) ); + sabcd s2 = sabcd(vec2(0.0, 0.0), vec2(0.0, 0.0) ); + s2 = s1; + gl_FragColor = vec4( vec3( (s2.a[0] + s2.a[1] + s2.b[0] + s2.b[1]) / 80.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec2_vert.vert new file mode 100644 index 0000000000..54f7de5b5e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec2_vert.vert @@ -0,0 +1,30 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + + + +struct sabcd +{ + vec2 a; + vec2 b; +}; + + + +void main (void) +{ + sabcd s1 = sabcd(vec2(12.0, 29.0), vec2(13.0, 26.0) ); + sabcd s2 = sabcd(vec2(0.0, 0.0), vec2(0.0, 0.0) ); + s2 = s1; + color = vec4( vec3( (s2.a[0] + s2.a[1] + s2.b[0] + s2.b[1]) / 80.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec3_frag.frag new file mode 100644 index 0000000000..cd3f12ccb1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec3_frag.frag @@ -0,0 +1,25 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct sabcd +{ + vec3 a; + vec3 b; +}; + + +void main (void) +{ + sabcd s = sabcd(vec3(12.0, 29.0, 32.0), vec3(13.0, 26.0, 38.0 ) ); + sabcd s2 = sabcd(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0 ) ); + s2 = s; + gl_FragColor = vec4( vec3( (s2.a[0] + s2.a[1] + s2.a[2] + s2.b[0] + s2.b[1] + s2.b[2]) / 150.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec3_vert.vert new file mode 100644 index 0000000000..eeddebe2ca --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec3_vert.vert @@ -0,0 +1,30 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + + + +struct sabcd +{ + vec3 a; + vec3 b; +}; + + + +void main (void) +{ + sabcd s1 = sabcd(vec3(12.0, 29.0, 32.0), vec3(13.0, 26.0, 38.0 ) ); + sabcd s2 = sabcd(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0 ) ); + s2 = s1; + color = vec4( vec3( (s2.a[0] + s2.a[1] + s2.a[2] + s2.b[0] + s2.b[1] + s2.b[2]) / 150.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec4_frag.frag new file mode 100644 index 0000000000..bf02e6cd61 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec4_frag.frag @@ -0,0 +1,26 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +struct sabcd +{ + vec4 a; + vec4 b; +}; + +void main (void) +{ + sabcd s = sabcd(vec4(12.0, 29.0, 32.0, 47.0), vec4(13.0, 26.0, 38.0, 53.0 ) ); + sabcd s2 = sabcd(vec4(0.0, 0.0, 0.0, 0.0), vec4(0.0, 0.0, 0.0, 0.0 ) ); + s2 = s; + gl_FragColor = vec4( vec3( (s2.a[0] + s2.a[1] + s2.a[2] + s2.a[3] + s2.b[0] + s2.b[1] + s2.b[2] + s2.b[3]) / 250.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec4_vert.vert new file mode 100644 index 0000000000..af30524ed2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structcopy_vec4_vert.vert @@ -0,0 +1,26 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct sabcd +{ + vec4 a; + vec4 b; +}; + +void main (void) +{ + sabcd s = sabcd(vec4(12.0, 29.0, 32.0, 47.0), vec4(13.0, 26.0, 38.0, 53.0 ) ); + sabcd s2 = sabcd(vec4(0.0, 0.0, 0.0, 0.0), vec4(0.0, 0.0, 0.0, 0.0 ) ); + s2 = s; + color = vec4( vec3( (s2.a[0] + s2.a[1] + s2.a[2] + s2.a[3] + s2.b[0] + s2.b[1] + s2.b[2] + s2.b[3]) / 250.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bool_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bool_frag.frag new file mode 100644 index 0000000000..74c30e5103 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bool_frag.frag @@ -0,0 +1,38 @@ + +/* +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 nestb +{ + bool b; +}; + +struct nesta +{ + bool a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(bool(1.0), nestb(bool(0.0)))); + float gray = 0.0; + + if( (s.nest_a.a == true) && (s.nest_a.nest_b.b == false)) + gray=1.0; + else + gray =0.0; + gl_FragColor = vec4(gray, gray, gray, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bool_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bool_vert.vert new file mode 100644 index 0000000000..3cfc2cf722 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bool_vert.vert @@ -0,0 +1,41 @@ + +/* +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 nestb +{ + bool b; +}; + +struct nesta +{ + bool a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(bool(1.0), nestb(bool(0.0)))); + float gray = 0.0; + + if( (s.nest_a.a == true) && (s.nest_a.nest_b.b == false)) + gray=1.0; + else + gray =0.0; + color = vec4(gray, gray, gray, 1.0); + + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag new file mode 100644 index 0000000000..d4515dbd2f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag @@ -0,0 +1,54 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +struct nestb +{ + bvec2 a2; + bvec3 b2; + bvec4 c2; +}; + +struct nesta +{ + bvec2 a1; + bvec3 b1; + bvec4 c1; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest( nesta( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ), + nestb( bvec2(28, 0), bvec3(0.0, 0.0, 1.0), bvec4(0.0, 17.0, 145, 0 ) + ) + ) + ); + float gray = 0.0; + if( ( s.nest_a.a1[0] ) && ( s.nest_a.a1[1] ) && + ( s.nest_a.b1[0] ) && (! (s.nest_a.b1[1]) ) && ( s.nest_a.b1[2] ) && + ( s.nest_a.c1[0] ) && ( s.nest_a.c1[1] ) && ( s.nest_a.c1[2] ) && ( s.nest_a.c1[3] ) && + ( s.nest_a.nest_b.a2[0] ) && ( !( s.nest_a.nest_b.a2[1] ) ) && + (! ( s.nest_a.nest_b.b2[0] ) ) && (! ( s.nest_a.nest_b.b2[1] ) ) && (s.nest_a.nest_b.b2[2]) && + (! ( s.nest_a.nest_b.c2[0] ) ) && (s.nest_a.nest_b.c2[1]) && (s.nest_a.nest_b.c2[2]) && (! ( s.nest_a.nest_b.c2[3] ) ) + ) + gray=1.0; + else + gray =0.0; + + gl_FragColor = vec4(gray, gray, gray, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert new file mode 100644 index 0000000000..c0ca10fc08 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert @@ -0,0 +1,57 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct nestb +{ + bvec2 a2; + bvec3 b2; + bvec4 c2; +}; + +struct nesta +{ + bvec2 a1; + bvec3 b1; + bvec4 c1; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + + nest s = nest( nesta( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ), + nestb( bvec2(28, 0), bvec3(0.0, 0.0, 1.0), bvec4(0.0, 17.0, 145, 0 ) + ) + ) + ); + + float gray = 0.0; + + if( ( s.nest_a.a1[0] ) && ( s.nest_a.a1[1] ) && + ( s.nest_a.b1[0] ) && (! (s.nest_a.b1[1]) ) && ( s.nest_a.b1[2] ) && + ( s.nest_a.c1[0] ) && ( s.nest_a.c1[1] ) && ( s.nest_a.c1[2] ) && ( s.nest_a.c1[3] ) && + ( s.nest_a.nest_b.a2[0] ) && ( !( s.nest_a.nest_b.a2[1] ) ) && + (! ( s.nest_a.nest_b.b2[0] ) ) && (! ( s.nest_a.nest_b.b2[1] ) ) && (s.nest_a.nest_b.b2[2]) && + (! ( s.nest_a.nest_b.c2[0] ) ) && (s.nest_a.nest_b.c2[1]) && (s.nest_a.nest_b.c2[2]) && (! ( s.nest_a.nest_b.c2[3] ) ) + ) + gray=1.0; + else + gray =0.0; + color = vec4(gray, gray, gray, 1.0); + + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_float_frag.frag new file mode 100644 index 0000000000..b914193aa1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_float_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 +struct nestb +{ + float b; +}; + +struct nesta +{ + float a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(1.0, nestb(2.0))); + gl_FragColor = vec4(vec3((s.nest_a.a + s.nest_a.nest_b.b) / 3.0), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_float_vert.vert new file mode 100644 index 0000000000..98436ea212 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_float_vert.vert @@ -0,0 +1,34 @@ + +/* +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 nestb +{ + float b; +}; + +struct nesta +{ + float a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(1.0, nestb(2.0))); + color = vec4(vec3((s.nest_a.a + s.nest_a.nest_b.b) / 3.0), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat2_frag.frag new file mode 100644 index 0000000000..9b16175271 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat2_frag.frag @@ -0,0 +1,34 @@ + +/* +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 nestb +{ + mat2 b; +}; + +struct nesta +{ + mat2 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta( mat2(11, 13, 29, 33), nestb( mat2(12, 19, 79, 81) ) ) ); + + + gl_FragColor = vec4( vec3( (s.nest_a.a[0][0] + s.nest_a.a[0][1] + s.nest_a.a[1][0] + s.nest_a.a[1][1] + s.nest_a.nest_b.b[0][0] + s.nest_a.nest_b.b[0][1] + s.nest_a.nest_b.b[1][0] + s.nest_a.nest_b.b[1][1] ) / 277.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat2_vert.vert new file mode 100644 index 0000000000..1aae92236d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat2_vert.vert @@ -0,0 +1,34 @@ + +/* +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 nestb +{ + mat2 b; +}; + +struct nesta +{ + mat2 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta( mat2(11, 13, 29, 33), nestb( mat2(12, 19, 79, 81) ) ) ); + color = vec4( vec3( (s.nest_a.a[0][0] + s.nest_a.a[0][1] + s.nest_a.a[1][0] + s.nest_a.a[1][1] + s.nest_a.nest_b.b[0][0] + s.nest_a.nest_b.b[0][1] + s.nest_a.nest_b.b[1][0] + s.nest_a.nest_b.b[1][1] ) / 277.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat3_frag.frag new file mode 100644 index 0000000000..407981499c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat3_frag.frag @@ -0,0 +1,62 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct nestb +{ + mat3 b; +}; + +struct nesta +{ + mat3 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta( mat3(11, 13, 29, 33, 63, 13, 49, 57, 71), nestb( mat3(12, 19, 79, 81, 35, 51, 73, 66, 23) ) ) ); + float sum1=0.0,sum2=0.0; + int i,j; + + sum1 = sum1 + s.nest_a.a[0][0]; + sum2 = sum2 + s.nest_a.nest_b.b[0][0]; + + sum1 = sum1 + s.nest_a.a[0][1]; + sum2 = sum2 + s.nest_a.nest_b.b[0][1]; + + sum1 = sum1 + s.nest_a.a[0][2]; + sum2 = sum2 + s.nest_a.nest_b.b[0][2]; + + sum1 = sum1 + s.nest_a.a[1][0]; + sum2 = sum2 + s.nest_a.nest_b.b[1][0]; + + sum1 = sum1 + s.nest_a.a[1][1]; + sum2 = sum2 + s.nest_a.nest_b.b[1][1]; + + sum1 = sum1 + s.nest_a.a[1][2]; + sum2 = sum2 + s.nest_a.nest_b.b[1][2]; + + sum1 = sum1 + s.nest_a.a[2][0]; + sum2 = sum2 + s.nest_a.nest_b.b[2][0]; + + sum1 = sum1 + s.nest_a.a[2][1]; + sum2 = sum2 + s.nest_a.nest_b.b[2][1]; + + sum1 = sum1 + s.nest_a.a[2][2]; + sum2 = sum2 + s.nest_a.nest_b.b[2][2]; + + gl_FragColor = vec4( vec3( ( sum1 + sum2 )/ 778.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat3_vert.vert new file mode 100644 index 0000000000..4870801b7d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat3_vert.vert @@ -0,0 +1,57 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +struct nestb +{ + mat3 b; +}; + +struct nesta +{ + mat3 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta( mat3(11, 13, 29, 33, 63, 13, 49, 57, 71), nestb( mat3(12, 19, 79, 81, 35, 51, 73, 66, 23) ) ) ); + float sum1=0.0,sum2=0.0; + + sum1 = sum1 + s.nest_a.a[0][0]; + sum2 = sum2 + s.nest_a.nest_b.b[0][0]; + sum1 = sum1 + s.nest_a.a[0][1]; + sum2 = sum2 + s.nest_a.nest_b.b[0][1]; + sum1 = sum1 + s.nest_a.a[0][2]; + sum2 = sum2 + s.nest_a.nest_b.b[0][2]; + + sum1 = sum1 + s.nest_a.a[1][0]; + sum2 = sum2 + s.nest_a.nest_b.b[1][0]; + sum1 = sum1 + s.nest_a.a[1][1]; + sum2 = sum2 + s.nest_a.nest_b.b[1][1]; + sum1 = sum1 + s.nest_a.a[1][2]; + sum2 = sum2 + s.nest_a.nest_b.b[1][2]; + + sum1 = sum1 + s.nest_a.a[2][0]; + sum2 = sum2 + s.nest_a.nest_b.b[2][0]; + sum1 = sum1 + s.nest_a.a[2][1]; + sum2 = sum2 + s.nest_a.nest_b.b[2][1]; + sum1 = sum1 + s.nest_a.a[2][2]; + sum2 = sum2 + s.nest_a.nest_b.b[2][2]; + + color = vec4( vec3( ( sum1 + sum2 )/ 778.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat4_frag.frag new file mode 100644 index 0000000000..147b8c5ba4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat4_frag.frag @@ -0,0 +1,83 @@ + +/* +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 nestb +{ + mat4 b; +}; + +struct nesta +{ + mat4 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta( mat4(11, 13, 29, 33, 63, 13, 49, 57, 71, 47, 91, 101, 167, 21, 39, 41), nestb( mat4(12, 19, 79, 81, 35, 51, 73, 66, 23, 134, 121, 156, 76, 23, 24, 78) ) ) ); + float sum1=0.0,sum2=0.0; + int i,j; + + sum1 = sum1 + s.nest_a.a[0][0]; + sum2 = sum2 + s.nest_a.nest_b.b[0][0]; + + sum1 = sum1 + s.nest_a.a[0][1]; + sum2 = sum2 + s.nest_a.nest_b.b[0][1]; + + sum1 = sum1 + s.nest_a.a[0][2]; + sum2 = sum2 + s.nest_a.nest_b.b[0][2]; + + sum1 = sum1 + s.nest_a.a[0][3]; + sum2 = sum2 + s.nest_a.nest_b.b[0][3]; + + sum1 = sum1 + s.nest_a.a[1][0]; + sum2 = sum2 + s.nest_a.nest_b.b[1][0]; + + sum1 = sum1 + s.nest_a.a[1][1]; + sum2 = sum2 + s.nest_a.nest_b.b[1][1]; + + sum1 = sum1 + s.nest_a.a[1][2]; + sum2 = sum2 + s.nest_a.nest_b.b[1][2]; + + sum1 = sum1 + s.nest_a.a[1][3]; + sum2 = sum2 + s.nest_a.nest_b.b[1][3]; + + sum1 = sum1 + s.nest_a.a[2][0]; + sum2 = sum2 + s.nest_a.nest_b.b[2][0]; + + sum1 = sum1 + s.nest_a.a[2][1]; + sum2 = sum2 + s.nest_a.nest_b.b[2][1]; + + sum1 = sum1 + s.nest_a.a[2][2]; + sum2 = sum2 + s.nest_a.nest_b.b[2][2]; + + sum1 = sum1 + s.nest_a.a[2][3]; + sum2 = sum2 + s.nest_a.nest_b.b[2][3]; + + sum1 = sum1 + s.nest_a.a[3][0]; + sum2 = sum2 + s.nest_a.nest_b.b[3][0]; + + sum1 = sum1 + s.nest_a.a[3][1]; + sum2 = sum2 + s.nest_a.nest_b.b[3][1]; + + sum1 = sum1 + s.nest_a.a[3][2]; + sum2 = sum2 + s.nest_a.nest_b.b[3][2]; + + sum1 = sum1 + s.nest_a.a[3][3]; + sum2 = sum2 + s.nest_a.nest_b.b[3][3]; + + gl_FragColor = vec4( vec3( ( sum1 + sum2 )/ 1897.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat4_vert.vert new file mode 100644 index 0000000000..b6bd4a21d0 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_mat4_vert.vert @@ -0,0 +1,72 @@ + +/* +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 nestb +{ + mat4 b; +}; + +struct nesta +{ + mat4 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta( mat4(11, 13, 29, 33, 63, 13, 49, 57, 71, 47, 91, 101, 167, 21, 39, 41), nestb( mat4(12, 19, 79, 81, 35, 51, 73, 66, 23, 134, 121, 156, 76, 23, 24, 78) ) ) ); + float sum1=0.0,sum2=0.0; + + sum1 = sum1 + s.nest_a.a[0][0]; + sum2 = sum2 + s.nest_a.nest_b.b[0][0]; + sum1 = sum1 + s.nest_a.a[0][1]; + sum2 = sum2 + s.nest_a.nest_b.b[0][1]; + sum1 = sum1 + s.nest_a.a[0][2]; + sum2 = sum2 + s.nest_a.nest_b.b[0][2]; + sum1 = sum1 + s.nest_a.a[0][3]; + sum2 = sum2 + s.nest_a.nest_b.b[0][3]; + + sum1 = sum1 + s.nest_a.a[1][0]; + sum2 = sum2 + s.nest_a.nest_b.b[1][0]; + sum1 = sum1 + s.nest_a.a[1][1]; + sum2 = sum2 + s.nest_a.nest_b.b[1][1]; + sum1 = sum1 + s.nest_a.a[1][2]; + sum2 = sum2 + s.nest_a.nest_b.b[1][2]; + sum1 = sum1 + s.nest_a.a[1][3]; + sum2 = sum2 + s.nest_a.nest_b.b[1][3]; + + sum1 = sum1 + s.nest_a.a[2][0]; + sum2 = sum2 + s.nest_a.nest_b.b[2][0]; + sum1 = sum1 + s.nest_a.a[2][1]; + sum2 = sum2 + s.nest_a.nest_b.b[2][1]; + sum1 = sum1 + s.nest_a.a[2][2]; + sum2 = sum2 + s.nest_a.nest_b.b[2][2]; + sum1 = sum1 + s.nest_a.a[2][3]; + sum2 = sum2 + s.nest_a.nest_b.b[2][3]; + + sum1 = sum1 + s.nest_a.a[3][0]; + sum2 = sum2 + s.nest_a.nest_b.b[3][0]; + sum1 = sum1 + s.nest_a.a[3][1]; + sum2 = sum2 + s.nest_a.nest_b.b[3][1]; + sum1 = sum1 + s.nest_a.a[3][2]; + sum2 = sum2 + s.nest_a.nest_b.b[3][2]; + sum1 = sum1 + s.nest_a.a[3][3]; + sum2 = sum2 + s.nest_a.nest_b.b[3][3]; + + color = vec4( vec3( ( sum1 + sum2 )/ 1897.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec2_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec2_frag.frag new file mode 100644 index 0000000000..e59911fec9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec2_frag.frag @@ -0,0 +1,33 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +struct nestb +{ + vec2 b; +}; + +struct nesta +{ + vec2 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(vec2(11, 13), nestb(vec2(12, 19) ) ) ); + + gl_FragColor = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] ) / 55.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec2_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec2_vert.vert new file mode 100644 index 0000000000..b7a6bfd88c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec2_vert.vert @@ -0,0 +1,34 @@ + +/* +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 nestb +{ + vec2 b; +}; + +struct nesta +{ + vec2 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(vec2(11, 13), nestb(vec2(12, 19) ) ) ); + color = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] ) / 55.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec3_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec3_frag.frag new file mode 100644 index 0000000000..fa650ac2ca --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec3_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 +struct nestb +{ + vec3 b; +}; + +struct nesta +{ + vec3 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(vec3(11, 13, 17), nestb(vec3(12, 19, 29) ) ) ); + gl_FragColor = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.a[2] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] + s.nest_a.nest_b.b[2]) / 101.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec3_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec3_vert.vert new file mode 100644 index 0000000000..6d9247639d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec3_vert.vert @@ -0,0 +1,34 @@ + +/* +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 nestb +{ + vec3 b; +}; + +struct nesta +{ + vec3 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(vec3(11, 13, 17), nestb(vec3(12, 19, 29) ) ) ); + color = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.a[2] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] + s.nest_a.nest_b.b[2]) / 101.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec4_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec4_frag.frag new file mode 100644 index 0000000000..bdd595424b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec4_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 +struct nestb +{ + vec4 b; +}; + +struct nesta +{ + vec4 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(vec4(11, 13, 17, 31), nestb(vec4(12, 19, 29, 69) ) ) ); + gl_FragColor = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.a[2] + s.nest_a.a[3] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] + s.nest_a.nest_b.b[2] + s.nest_a.nest_b.b[3]) / 201.0 ), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec4_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec4_vert.vert new file mode 100644 index 0000000000..46fad09a83 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/struct/structnest_vec4_vert.vert @@ -0,0 +1,34 @@ + +/* +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 nestb +{ + vec4 b; +}; + +struct nesta +{ + vec4 a; + nestb nest_b; +}; + +struct nest +{ + nesta nest_a; +}; + +void main (void) +{ + nest s = nest(nesta(vec4(11, 13, 17, 31), nestb(vec4(12, 19, 29, 69) ) ) ); + color = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.a[2] + s.nest_a.a[3] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] + s.nest_a.nest_b.b[2] + s.nest_a.nest_b.b[3]) / 201.0 ), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} |