summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/array_001_to_006.html201
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_frag.frag28
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_vert.vert27
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag28
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert30
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag33
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert32
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/input.run.txt2
8 files changed, 381 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/array_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/array_001_to_006.html
new file mode 100644
index 0000000000..2439fd7a61
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/array_001_to_006.html
@@ -0,0 +1,201 @@
+<!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: array_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",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "new_mad2": {
+ "count": 2,
+ "type": "uniform1fv",
+ "value": [
+ 45.0,
+ 14.0
+ ]
+ }
+ },
+ "fragmentShader": "empty_uniform_array_float_frag.frag"
+ },
+ "name": "empty_uniform_array_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "empty_uniform_array_float_vert.vert",
+ "uniforms": {
+ "new_mad2": {
+ "count": 2,
+ "type": "uniform1fv",
+ "value": [
+ 45.0,
+ 14.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "empty_uniform_array_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "empty_empty_array_float_frag.frag"
+ },
+ "name": "empty_empty_array_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "empty_empty_array_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "empty_empty_array_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "initfunc_empty_array_float_frag.frag"
+ },
+ "name": "initfunc_empty_array_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "initfunc_empty_array_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "initfunc_empty_array_float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_frag.frag
new file mode 100644
index 0000000000..0210ea7c15
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_frag.frag
@@ -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.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+
+ new_mad[0]=float(1);
+ new_mad[1]=float(2);
+
+ if( (new_mad[0] == 1.0) && (new_mad[1] == 2.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray,gray , gray, 1.0);
+
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_vert.vert
new file mode 100644
index 0000000000..f5f9741dfc
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_empty_array_float_vert.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+
+ new_mad[0]=float(1);
+ new_mad[1]=float(2);
+
+ if( (new_mad[0] == 1.0) && (new_mad[1] == 2.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag
new file mode 100644
index 0000000000..8960e06733
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag
@@ -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.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+uniform float new_mad2[2];
+
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+
+ new_mad[0]=new_mad2[0];
+ new_mad[1]=new_mad2[1];
+
+ if( (new_mad[0] == 45.0) && (new_mad[1] == 14.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert
new file mode 100644
index 0000000000..b81eea7f1f
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert
@@ -0,0 +1,30 @@
+
+/*
+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;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+const int array_size = 2;
+uniform float new_mad2[array_size];
+
+void main (void)
+{
+ int i=0;
+ float new_mad[array_size];
+ float gray = 0.0;
+
+ new_mad[0] = new_mad2[0];
+ new_mad[1] = new_mad2[1];
+
+ if( (new_mad[0] == 45.0) && (new_mad[1] == 14.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag
new file mode 100644
index 0000000000..93fc911ae9
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+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 initialise_array(out float array[2], float init_val);
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+ initialise_array(new_mad,25.0);
+ if( (new_mad[0] == 25.0) && (new_mad[1] == 25.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+void initialise_array(out float array[2], float init_val)
+{
+ int i=0;
+ array[0] = init_val;
+ array[1] = init_val;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert
new file mode 100644
index 0000000000..c6347c99c1
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/initfunc_empty_array_float_vert.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_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void initialise_array(out float array[2], float init_val);
+
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+ initialise_array(new_mad,25.0);
+ if( (new_mad[0] == 25.0) && (new_mad[1] == 25.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+void initialise_array(out float array[2], float init_val)
+{
+ array[0] = init_val;
+ array[1] = init_val;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/input.run.txt
new file mode 100644
index 0000000000..c7cbc1049a
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/array/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+array_001_to_006.html