summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/input.run.txt2
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_001_to_006.html109
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag21
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert20
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert22
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag23
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert20
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert23
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag19
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag23
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert20
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert24
14 files changed, 364 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/input.run.txt
new file mode 100644
index 0000000000..5c675deae6
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+min_001_to_006.html
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_001_to_006.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_001_to_006.html
new file mode 100644
index 0000000000..119071f891
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_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: min_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": "min_float_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_float_frag_xvary_yconsthalf.frag"
+ },
+ "name": "min_float_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_vec2_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_vec2_frag_xvary_yconsthalf.frag"
+ },
+ "name": "min_vec2_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_vec3_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_vec3_frag_xvary_yconsthalf.frag"
+ },
+ "name": "min_vec3_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "min_float_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "min_float_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "min_float_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "min_vec2_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "min_vec2_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "min_vec2_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "min_vec3_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "min_vec3_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "min_vec3_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag
new file mode 100644
index 0000000000..033cb89760
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag
@@ -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.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.5;
+ float c = color.r;
+ gl_FragColor = vec4(min(c, min_c), 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 0000000000..698b5341d7
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,21 @@
+
+/*
+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)
+{
+ const float min_c = 0.5;
+ float c = color.r;
+ if(c > min_c) c = min_c;
+
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert
new file mode 100644
index 0000000000..aadc185f2a
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert
@@ -0,0 +1,20 @@
+
+/*
+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)
+{
+ const float min_c = 0.5;
+ float c = gtf_Color.r;
+ color = vec4(min(c, min_c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 0000000000..140ce28e20
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,22 @@
+
+/*
+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)
+{
+ const float min_c = 0.5;
+ float c = gtf_Color.r;
+ if(c > min_c) c = min_c;
+
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag
new file mode 100644
index 0000000000..d707e8946c
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag
@@ -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.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 min_c = vec2(0.5, 0.5);
+ vec2 c = color.rg;
+ gl_FragColor = vec4(min(c, min_c), 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 0000000000..2390a8ea1a
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,23 @@
+
+/*
+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)
+{
+ const vec2 min_c = vec2(0.5, 0.5);
+ vec2 c = color.rg;
+ if(c[0] > min_c[0]) c[0] = min_c[0];
+ if(c[1] > min_c[1]) c[1] = min_c[1];
+
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert
new file mode 100644
index 0000000000..0965d586c1
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert
@@ -0,0 +1,20 @@
+
+/*
+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)
+{
+ const vec2 min_c = vec2(0.5, 0.5);
+ vec2 c = gtf_Color.rg;
+ color = vec4(min(c, min_c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 0000000000..90729852b0
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,23 @@
+
+/*
+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)
+{
+ const vec2 min_c = vec2(0.5, 0.5);
+ vec2 c = gtf_Color.rg;
+ if(c[0] > min_c[0]) c[0] = min_c[0];
+ if(c[1] > min_c[1]) c[1] = min_c[1];
+
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag
new file mode 100644
index 0000000000..d2ef6bbbb0
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag
@@ -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.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 min_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(min(c, min_c), 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 0000000000..2045641652
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,23 @@
+
+/*
+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)
+{
+ const vec3 min_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = color.rgb;
+ if(c[0] > min_c[0]) c[0] = min_c[0];
+ if(c[1] > min_c[1]) c[1] = min_c[1];
+ if(c[2] > min_c[2]) c[2] = min_c[2];
+
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert
new file mode 100644
index 0000000000..234368010d
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert
@@ -0,0 +1,20 @@
+
+/*
+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)
+{
+ const vec3 min_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = gtf_Color.rgb;
+ color = vec4(min(c, min_c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 0000000000..c4a158d399
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,24 @@
+
+/*
+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)
+{
+ const vec3 min_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = gtf_Color.rgb;
+ if(c[0] > min_c[0]) c[0] = min_c[0];
+ if(c[1] > min_c[1]) c[1] = min_c[1];
+ if(c[2] > min_c[2]) c[2] = min_c[2];
+
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}