summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/input.run.txt2
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_001_to_006.html109
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert19
14 files changed, 333 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/input.run.txt
new file mode 100644
index 0000000000..56ce6dcbe7
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+normalize_001_to_006.html
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_001_to_006.html
new file mode 100644
index 0000000000..62b9d239d7
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_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: normalize_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": "normalize_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_float_frag_xvary.frag"
+ },
+ "name": "normalize_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_vec2_frag_xvary.frag"
+ },
+ "name": "normalize_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_vec3_frag_xvary.frag"
+ },
+ "name": "normalize_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "normalize_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "normalize_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "normalize_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "normalize_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "normalize_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "normalize_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "normalize_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "normalize_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "normalize_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag
new file mode 100644
index 0000000000..805f05753e
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_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)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(normalize(tmp_Color.r), 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag
new file mode 100644
index 0000000000..f6cba372fd
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.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)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(tmp_Color.r / length(tmp_Color.r), 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert
new file mode 100644
index 0000000000..988c7a6064
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_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)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(normalize(tmp_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/normalize/normalize_float_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.vert
new file mode 100644
index 0000000000..3e30cfd84d
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.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)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(tmp_Color.r / length(tmp_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/normalize/normalize_vec2_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary.frag
new file mode 100644
index 0000000000..c9df5ecc65
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_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)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(normalize(tmp_Color.rg), 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag
new file mode 100644
index 0000000000..e329881062
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.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)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(tmp_Color.rg / length(tmp_Color.rg), 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert
new file mode 100644
index 0000000000..837b149468
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_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)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(normalize(tmp_Color.rg), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert
new file mode 100644
index 0000000000..ecfdfbbc87
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.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)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(tmp_Color.rg / length(tmp_Color.rg), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag
new file mode 100644
index 0000000000..78115d7e8b
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_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)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(normalize(tmp_Color.rgb), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag
new file mode 100644
index 0000000000..aa89b52583
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.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)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(tmp_Color.rgb / length(tmp_Color.rgb), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert
new file mode 100644
index 0000000000..747b879203
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_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)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(normalize(tmp_Color.rgb), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert
new file mode 100644
index 0000000000..70b06e99ba
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.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)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(tmp_Color.rgb / length(tmp_Color.rgb), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}