summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/input.run.txt2
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_001_to_006.html109
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_frag_xvary.frag17
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag17
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_vert_xvary.vert18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_frag_xvary.frag17
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag17
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_vert_xvary.vert18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_frag_xvary.frag17
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag17
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_vert_xvary.vert18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert18
14 files changed, 321 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/input.run.txt
new file mode 100644
index 0000000000..9a3147ec3c
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+length_001_to_006.html
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_001_to_006.html
new file mode 100644
index 0000000000..cdcc97b5b8
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_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: length_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": "length_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_float_frag_xvary.frag"
+ },
+ "name": "length_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_vec2_frag_xvary.frag"
+ },
+ "name": "length_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_vec3_frag_xvary.frag"
+ },
+ "name": "length_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "length_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "length_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "length_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "length_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "length_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "length_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "length_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "length_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "length_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_frag_xvary.frag
new file mode 100644
index 0000000000..6b69eceeeb
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_frag_xvary.frag
@@ -0,0 +1,17 @@
+
+/*
+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)
+{
+ gl_FragColor = vec4(vec3(length(color.r)), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag
new file mode 100644
index 0000000000..9e5672b1d5
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag
@@ -0,0 +1,17 @@
+
+/*
+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)
+{
+ gl_FragColor = vec4(vec3(color.r), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_vert_xvary.vert
new file mode 100644
index 0000000000..984e83943b
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_vert_xvary.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(length(gtf_Color.r)), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert
new file mode 100644
index 0000000000..940b53e278
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(gtf_Color.r), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_frag_xvary.frag
new file mode 100644
index 0000000000..bbba3bfa75
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_frag_xvary.frag
@@ -0,0 +1,17 @@
+
+/*
+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)
+{
+ gl_FragColor = vec4(vec3(length(color.rg) / 2.0), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag
new file mode 100644
index 0000000000..18a2913050
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag
@@ -0,0 +1,17 @@
+
+/*
+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)
+{
+ gl_FragColor = vec4(vec3(sqrt(color.r*color.r + color.g*color.g) / 2.0), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_vert_xvary.vert
new file mode 100644
index 0000000000..3d422ce046
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_vert_xvary.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(length(gtf_Color.rg) / 2.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert
new file mode 100644
index 0000000000..9540f93c8d
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(sqrt(gtf_Color.r*gtf_Color.r + gtf_Color.g*gtf_Color.g) / 2.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_frag_xvary.frag
new file mode 100644
index 0000000000..00ae4460b7
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_frag_xvary.frag
@@ -0,0 +1,17 @@
+
+/*
+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)
+{
+ gl_FragColor = vec4(vec3(length(color.rgb) / 3.0), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag
new file mode 100644
index 0000000000..4c092c505d
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag
@@ -0,0 +1,17 @@
+
+/*
+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)
+{
+ gl_FragColor = vec4(vec3(sqrt(color.r*color.r + color.g*color.g + color.b*color.b) / 3.0), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_vert_xvary.vert
new file mode 100644
index 0000000000..469e2ebda9
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_vert_xvary.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(length(gtf_Color.rgb) / 3.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert
new file mode 100644
index 0000000000..a29e150036
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(sqrt(gtf_Color.r*gtf_Color.r + gtf_Color.g*gtf_Color.g + gtf_Color.b*gtf_Color.b) / 3.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}