diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
14 files changed, 359 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/input.run.txt new file mode 100644 index 0000000000..f1c7ead980 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/input.run.txt @@ -0,0 +1,2 @@ +# this file is auto-generated. DO NOT EDIT. +mix_001_to_006.html diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_001_to_006.html new file mode 100644 index 0000000000..27ee005d9b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_001_to_006.html @@ -0,0 +1,109 @@ +<!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: mix_001_to_006.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", + "fragmentShader": "mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mix_float_frag_xvary_yconsthalf_aconsthalf.frag" + }, + "name": "mix_float_frag_xvary_yconsthalf_aconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag" + }, + "name": "mix_vec2_frag_xvary_yconsthalf_aconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag" + }, + "name": "mix_vec3_frag_xvary_yconsthalf_aconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "mix_float_vert_xvary_yconsthalf_aconsthalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mix_float_vert_xvary_yconsthalf_aconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mix_vec2_vert_xvary_yconsthalf_aconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "mix_vec3_vert_xvary_yconsthalf_aconsthalf.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag new file mode 100644 index 0000000000..f921b5752a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag @@ -0,0 +1,20 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + const float y = 0.5; + const float a = 0.5; + float c = color.r; + gl_FragColor = vec4(mix(c, y, a), 0.0, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag new file mode 100644 index 0000000000..f9aec91bde --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag @@ -0,0 +1,21 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + const float y = 0.5; + const float a = 0.5; + float c = color.r; + + gl_FragColor = vec4(c * (1.0 - a) + y * a, 0.0, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert new file mode 100644 index 0000000000..7dd10983fd --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert @@ -0,0 +1,21 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const float y = 0.5; + const float a = 0.5; + float c = gtf_Color.r; + color = vec4(mix(c, y, a), 0.0, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert new file mode 100644 index 0000000000..7379a1eb0e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert @@ -0,0 +1,22 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const float y = 0.5; + const float a = 0.5; + float c = gtf_Color.r; + + color = vec4(c * (1.0 - a) + y * a, 0.0, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag new file mode 100644 index 0000000000..1392a167df --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag @@ -0,0 +1,19 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + const vec2 y = vec2(0.5, 0.5); + const vec2 a = vec2(0.5, 0.5); + gl_FragColor = vec4(mix(color.rg, y, a), 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag new file mode 100644 index 0000000000..0b814b8127 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag @@ -0,0 +1,21 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + const vec2 y = vec2(0.5, 0.5); + const vec2 a = vec2(0.5, 0.5); + vec2 c = color.rg; + + gl_FragColor = vec4(c * (1.0 - a) + y * a, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert new file mode 100644 index 0000000000..98b357af33 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert @@ -0,0 +1,20 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const vec2 y = vec2(0.5, 0.5); + const vec2 a = vec2(0.5, 0.5); + color = vec4(mix(gtf_Color.rg, y, a), 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert new file mode 100644 index 0000000000..19af8d1028 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert @@ -0,0 +1,22 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const vec2 y = vec2(0.5, 0.5); + const vec2 a = vec2(0.5, 0.5); + vec2 c = gtf_Color.rg; + + color = vec4(c * (1.0 - a) + y * a, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag new file mode 100644 index 0000000000..9a55d3ff09 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag @@ -0,0 +1,19 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + const vec3 y = vec3(0.5, 0.5, 0.5); + const vec3 a = vec3(0.5, 0.5, 0.5); + gl_FragColor = vec4(mix(color.rgb, y, a), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag new file mode 100644 index 0000000000..88e44aae9e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag @@ -0,0 +1,21 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + const vec3 y = vec3(0.5, 0.5, 0.5); + const vec3 a = vec3(0.5, 0.5, 0.5); + vec3 c = color.rgb; + + gl_FragColor = vec4(c * (1.0 - a) + y * a, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert new file mode 100644 index 0000000000..a7abbd653d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert @@ -0,0 +1,20 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const vec3 y = vec3(0.5, 0.5, 0.5); + const vec3 a = vec3(0.5, 0.5, 0.5); + color = vec4(mix(gtf_Color.rgb, y, a), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert new file mode 100644 index 0000000000..64aba2a9a1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert @@ -0,0 +1,22 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const vec3 y = vec3(0.5, 0.5, 0.5); + const vec3 a = vec3(0.5, 0.5, 0.5); + vec3 c = gtf_Color.rgb; + + color = vec4(c * (1.0 - a) + y * a, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} |