summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/input.run.txt2
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3_001_to_006.html343
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag36
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert35
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag36
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert36
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag26
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert32
8 files changed, 546 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/input.run.txt
new file mode 100644
index 0000000000..f79e127c27
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+mat3_001_to_006.html
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3_001_to_006.html
new file mode 100644
index 0000000000..cd332fa805
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3_001_to_006.html
@@ -0,0 +1,343 @@
+<!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: mat3_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": [
+ 0.5,
+ 0.25,
+ 0.125,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat3arraysimple_vert.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3arraysimple_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 0.75,
+ 0.625,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat3arrayindirect0_vert.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3arrayindirect0_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.25,
+ 0.125,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat3arrayindirect1_vert.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3arrayindirect1_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.25,
+ 0.125,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "mat3arraysimple_frag.frag"
+ },
+ "name": "mat3arraysimple_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 0.75,
+ 0.625,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "mat3arrayindirect0_frag.frag"
+ },
+ "name": "mat3arrayindirect0_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.25,
+ 0.125,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "mat3arrayindirect1_frag.frag"
+ },
+ "name": "mat3arrayindirect1_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag
new file mode 100644
index 0000000000..d1aba8a919
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag
@@ -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.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// mat3arrayindirect0_frag.frag: Fragment shader solid color
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ /*
+ // No indirect indexing in fragment shaders
+ for(int j = 0; j < 3; j++)
+ {
+ result += testmat3[0][j] + testmat3[1][j];
+ }
+ */
+ result += testmat3[0][0] + testmat3[1][0];
+ result += testmat3[0][1] + testmat3[1][1];
+ result += testmat3[0][2] + testmat3[1][2];
+ gl_FragColor = vec4(result/2.0, 0.5);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert
new file mode 100644
index 0000000000..12f3396d26
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert
@@ -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.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// mat3arrayindirect0_vert.vert: Vertex shader solid color
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ for(int j = 0; j < 3; j++)
+ {
+ result += testmat3[0][j] + testmat3[1][j];
+ }
+
+ color = vec4(result/2.0, 0.5);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag
new file mode 100644
index 0000000000..c9a7bf7075
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag
@@ -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.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// mat3arrayindirect1_frag.frag: Fragment shader solid color testing indirect referencing into uniforms
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ /*
+ // No indirect indexing in fragment shaders
+ for(int j = 0; j < 3; j++)
+ {
+ result += testmat3[1][j];
+ }
+*/
+ result += testmat3[1][0];
+ result += testmat3[1][1];
+ result += testmat3[1][2];
+ gl_FragColor = vec4(result/2.0, 0.5);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert
new file mode 100644
index 0000000000..6f66656626
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.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_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// mat3arrayindirect1_vert.vert: Vertex shader solid color testing indirect referencing into uniforms
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ for(int j = 0; j < 3; j++)
+ {
+ result += testmat3[1][j];
+ }
+
+
+ color = vec4(result/2.0, 0.5);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag
new file mode 100644
index 0000000000..4e0ee397ed
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag
@@ -0,0 +1,26 @@
+
+/*
+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
+// mat3arraysimple_frag.frag: Fragment shader solid color testing indirect referencing into uniforms
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ result = testmat3[1][0] + testmat3[1][1] + testmat3[1][2];
+ gl_FragColor = vec4(result/2.0, 0.5);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert
new file mode 100644
index 0000000000..b05e52a9a4
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/mat3/mat3arraysimple_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;
+//
+// mat3arraysimple_vert.vert: Vertex shader solid color testing indirect referencing into uniforms
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ result = testmat3[1][0] + testmat3[1][1] + testmat3[1][2];
+
+ color = vec4(result/2.0, 0.5);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}