summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_001_to_006.html109
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag20
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.vert21
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag21
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert22
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag23
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert23
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/input.run.txt2
14 files changed, 352 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_001_to_006.html
new file mode 100644
index 0000000000..b6578ff3de
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_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: abs_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": "abs_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_float_frag_xvary.frag"
+ },
+ "name": "abs_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_vec2_frag_xvary.frag"
+ },
+ "name": "abs_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_vec3_frag_xvary.frag"
+ },
+ "name": "abs_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "abs_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "abs_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "abs_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "abs_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "abs_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "abs_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "abs_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "abs_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "abs_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_frag_xvary.frag
new file mode 100644
index 0000000000..23aee9561c
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_frag_xvary.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)
+{
+ float c = 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(abs(c), 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag
new file mode 100644
index 0000000000..604d0e86b0
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.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)
+{
+ float c = 2.0 * (color.r - 0.5);
+ if(c < 0.0) c *= -1.0;
+
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_vert_xvary.vert
new file mode 100644
index 0000000000..48d51ed05a
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_vert_xvary.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_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(abs(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/abs/abs_float_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.vert
new file mode 100644
index 0000000000..71d1543400
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.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_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ if(c < 0.0) c *= -1.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/abs/abs_vec2_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_frag_xvary.frag
new file mode 100644
index 0000000000..ccb594c0e5
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_frag_xvary.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)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(abs(c), 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag
new file mode 100644
index 0000000000..b0bbc5ec9b
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_frag_xvary_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)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ if((c[0] < 0.0)) c[0] *= -1.0;
+ if((c[1] < 0.0)) c[1] *= -1.0;
+
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert
new file mode 100644
index 0000000000..9845381038
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_vert_xvary.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_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(abs(c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert
new file mode 100644
index 0000000000..f2b3ba0b3e
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec2_vert_xvary_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_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ if((c[0] < 0.0)) c[0] *= -1.0;
+ if((c[1] < 0.0)) c[1] *= -1.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/abs/abs_vec3_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_frag_xvary.frag
new file mode 100644
index 0000000000..5014c6045c
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_frag_xvary.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)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(abs(c), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag
new file mode 100644
index 0000000000..6a587accb8
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.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;
+
+void main (void)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ if((c[0] < 0.0)) c[0] *= -1.0;
+ if((c[1] < 0.0)) c[1] *= -1.0;
+ if((c[2] < 0.0)) c[2] *= -1.0;
+
+
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert
new file mode 100644
index 0000000000..7a64d4efda
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_vert_xvary.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_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(abs(c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert
new file mode 100644
index 0000000000..db5eb81863
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/abs_vec3_vert_xvary_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_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ if((c[0] < 0.0)) c[0] *= -1.0;
+ if((c[1] < 0.0)) c[1] *= -1.0;
+ if((c[2] < 0.0)) c[2] *= -1.0;
+
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/input.run.txt
new file mode 100644
index 0000000000..ebf5dc91f1
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/abs/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+abs_001_to_006.html