summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_001_to_006.html109
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag27
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert28
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag31
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert32
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag35
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert36
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/input.run.txt2
14 files changed, 411 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_001_to_006.html
new file mode 100644
index 0000000000..433abdcede
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_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: floor_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": "floor_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_float_frag_xvary.frag"
+ },
+ "name": "floor_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_vec2_frag_xvary.frag"
+ },
+ "name": "floor_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_vec3_frag_xvary.frag"
+ },
+ "name": "floor_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "floor_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "floor_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "floor_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "floor_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "floor_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "floor_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "floor_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "floor_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "floor_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_frag_xvary.frag
new file mode 100644
index 0000000000..5b74e045b6
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_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 = 10.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4((floor(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag
new file mode 100644
index 0000000000..6d7a786a98
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag
@@ -0,0 +1,27 @@
+
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float floor_ref(float x)
+{
+ if(x >= 0.0)
+ x = float(int(x));
+ else
+ x = float(int(x) - 1);
+ return x;
+}
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4((floor_ref(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_vert_xvary.vert
new file mode 100644
index 0000000000..987259940a
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_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_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4((floor(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert
new file mode 100644
index 0000000000..9fe17c740f
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.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_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+float floor_ref(float x)
+{
+ if(x >= 0.0)
+ x = float(int(x));
+ else
+ x = float(int(x) - 1);
+ return x;
+}
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4((floor_ref(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag
new file mode 100644
index 0000000000..54a6d9a15f
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_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 = 10.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4((floor(c) + 10.0) / 20.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag
new file mode 100644
index 0000000000..3f537cc357
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.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
+varying vec4 color;
+
+vec2 floor_ref(vec2 x)
+{
+ if(x[0] >= 0.0)
+ x[0] = float(int(x[0]));
+ else
+ x[0] = float(int(x[0]) - 1);
+ if(x[1] >= 0.0)
+ x[1] = float(int(x[1]));
+ else
+ x[1] = float(int(x[1]) - 1);
+ return x;
+}
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4((floor_ref(c) + 10.0) / 20.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert
new file mode 100644
index 0000000000..3b53e23dad
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_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_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4((floor(c) + 10.0) / 20.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert
new file mode 100644
index 0000000000..fabb3a0f0f
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.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_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+vec2 floor_ref(vec2 x)
+{
+ if(x[0] >= 0.0)
+ x[0] = float(int(x[0]));
+ else
+ x[0] = float(int(x[0]) - 1);
+ if(x[1] >= 0.0)
+ x[1] = float(int(x[1]));
+ else
+ x[1] = float(int(x[1]) - 1);
+ return x;
+}
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4((floor_ref(c) + 10.0) / 20.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag
new file mode 100644
index 0000000000..55bd572178
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_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 = 10.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4((floor(c) + 10.0) / 20.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag
new file mode 100644
index 0000000000..279f765c40
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag
@@ -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.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+vec3 floor_ref(vec3 x)
+{
+ if(x[0] >= 0.0)
+ x[0] = float(int(x[0]));
+ else
+ x[0] = float(int(x[0]) - 1);
+ if(x[1] >= 0.0)
+ x[1] = float(int(x[1]));
+ else
+ x[1] = float(int(x[1]) - 1);
+ if(x[2] >= 0.0)
+ x[2] = float(int(x[2]));
+ else
+ x[2] = float(int(x[2]) - 1);
+ return x;
+}
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4((floor_ref(c) + 10.0) / 20.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert
new file mode 100644
index 0000000000..feacc63fb2
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_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_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4((floor(c) + 10.0) / 20.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert
new file mode 100644
index 0000000000..8913a2b00c
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+vec3 floor_ref(vec3 x)
+{
+ if(x[0] >= 0.0)
+ x[0] = float(int(x[0]));
+ else
+ x[0] = float(int(x[0]) - 1);
+ if(x[1] >= 0.0)
+ x[1] = float(int(x[1]));
+ else
+ x[1] = float(int(x[1]) - 1);
+ if(x[2] >= 0.0)
+ x[2] = float(int(x[2]));
+ else
+ x[2] = float(int(x[2]) - 1);
+ return x;
+}
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4((floor_ref(c) + 10.0) / 20.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/input.run.txt
new file mode 100644
index 0000000000..337787db8b
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/floor/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+floor_001_to_006.html