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/step | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step')
14 files changed, 429 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/input.run.txt new file mode 100644 index 0000000000..6b8ac005dc --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/input.run.txt @@ -0,0 +1,2 @@ +# this file is auto-generated. DO NOT EDIT. +step_001_to_006.html diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_001_to_006.html new file mode 100644 index 0000000000..1a4297a415 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_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: step_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": "step_float_frag_xvary_edgeconsthalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "step_float_frag_xvary_edgeconsthalf.frag" + }, + "name": "step_float_frag_xvary_edgeconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "step_vec2_frag_xvary_edgeconsthalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "step_vec2_frag_xvary_edgeconsthalf.frag" + }, + "name": "step_vec2_frag_xvary_edgeconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "step_vec3_frag_xvary_edgeconsthalf_ref.frag" + }, + "model": null, + "testProgram": { + "vertexShader": "../default/default.vert", + "fragmentShader": "step_vec3_frag_xvary_edgeconsthalf.frag" + }, + "name": "step_vec3_frag_xvary_edgeconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "step_float_vert_xvary_edgeconsthalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "step_float_vert_xvary_edgeconsthalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "step_float_vert_xvary_edgeconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "step_vec2_vert_xvary_edgeconsthalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "step_vec2_vert_xvary_edgeconsthalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "step_vec2_vert_xvary_edgeconsthalf.test.html", + "pattern": "compare" + }, + { + "referenceProgram": { + "vertexShader": "step_vec3_vert_xvary_edgeconsthalf_ref.vert", + "fragmentShader": "../default/default.frag" + }, + "model": "grid", + "testProgram": { + "vertexShader": "step_vec3_vert_xvary_edgeconsthalf.vert", + "fragmentShader": "../default/default.frag" + }, + "name": "step_vec3_vert_xvary_edgeconsthalf.test.html", + "pattern": "compare" + } + ] +}); +var successfullyParsed = true; +</script> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag new file mode 100644 index 0000000000..a79fab9e71 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag @@ -0,0 +1,18 @@ + +/* +Copyright (c) 2019 The 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 edge = 0.5; + gl_FragColor = vec4(step(edge, color.r), 0.0, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag new file mode 100644 index 0000000000..b5ac9648e4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag @@ -0,0 +1,22 @@ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + + +#ifdef GL_ES +precision mediump float; +#endif +varying vec4 color; + +void main (void) +{ + const float edge = 0.5; + float c = color.r; + if(c >= edge) c = 1.0; + else c = 0.0; + + gl_FragColor = vec4(c, 0.0, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert new file mode 100644 index 0000000000..b7cf8c7c2d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert @@ -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. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const float edge = 0.5; + color = vec4(step(edge, gtf_Color.r), 0.0, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.vert new file mode 100644 index 0000000000..6e298d4c68 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const float edge = 0.5; + float c = gtf_Color.r; + if(c >= edge) c = 1.0; + else c = 0.0; + + color = vec4(c, 0.0, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag new file mode 100644 index 0000000000..6882df1b7e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag @@ -0,0 +1,18 @@ + +/* +Copyright (c) 2019 The 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 edge = vec2(0.5, 0.5); + gl_FragColor = vec4(step(edge, color.rg), 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.frag new file mode 100644 index 0000000000..6643e48d8e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.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; + +void main (void) +{ + const vec2 edge = vec2(0.5, 0.5); + vec2 c = color.rg; + if(c[0] >= edge[0]) + { + c[0] = 1.0; + } + else + { + c[0] = 0.0; + } + if(c[1] >= edge[1]) + { + c[1] = 1.0; + } + else + { + c[1] = 0.0; + } + + gl_FragColor = vec4(c, 0.0, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert new file mode 100644 index 0000000000..c6c44ff0b5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert @@ -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. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const vec2 edge = vec2(0.5, 0.5); + color = vec4(step(edge, gtf_Color.rg), 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.vert new file mode 100644 index 0000000000..177e9d3c5e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.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_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const vec2 edge = vec2(0.5, 0.5); + vec2 c = gtf_Color.rg; + if(c[0] >= edge[0]) + { + c[0] = 1.0; + } + else + { + c[0] = 0.0; + } + if(c[1] >= edge[1]) + { + c[1] = 1.0; + } + else + { + c[1] = 0.0; + } + + color = vec4(c, 0.0, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag new file mode 100644 index 0000000000..b27d163c46 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag @@ -0,0 +1,18 @@ + +/* +Copyright (c) 2019 The 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 edge = vec3(0.5, 0.5, 0.5); + gl_FragColor = vec4(step(edge, color.rgb), 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag new file mode 100644 index 0000000000..1dfc326ccb --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag @@ -0,0 +1,44 @@ + +/* +Copyright (c) 2019 The 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 edge = vec3(0.5, 0.5, 0.5); + vec3 c = color.rgb; + if(c[0] >= edge[0]) + { + c[0] = 1.0; + } + else + { + c[0] = 0.0; + } + if(c[1] >= edge[1]) + { + c[1] = 1.0; + } + else + { + c[1] = 0.0; + } + if(c[2] >= edge[2]) + { + c[2] = 1.0; + } + else + { + c[2] = 0.0; + } + + gl_FragColor = vec4(c, 1.0); +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert new file mode 100644 index 0000000000..a943b02201 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert @@ -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. +*/ + + +attribute vec4 gtf_Color; +attribute vec4 gtf_Vertex; +uniform mat4 gtf_ModelViewProjectionMatrix; +varying vec4 color; + +void main (void) +{ + const vec3 edge = vec3(0.5, 0.5, 0.5); + color = vec4(step(edge, gtf_Color.rgb), 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert new file mode 100644 index 0000000000..c8d2442fa6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert @@ -0,0 +1,45 @@ + +/* +Copyright (c) 2019 The 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 edge = vec3(0.5, 0.5, 0.5); + vec3 c = gtf_Color.rgb; + if(c[0] >= edge[0]) + { + c[0] = 1.0; + } + else + { + c[0] = 0.0; + } + if(c[1] >= edge[1]) + { + c[1] = 1.0; + } + else + { + c[1] = 0.0; + } + if(c[2] >= edge[2]) + { + c[2] = 1.0; + } + else + { + c[2] = 0.0; + } + + color = vec4(c, 1.0); + gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex; +} |