summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html44
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag18
-rw-r--r--dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/input.run.txt2
3 files changed, 64 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html
new file mode 100644
index 0000000000..dc1fe1ac87
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html
@@ -0,0 +1,44 @@
+<!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: gl_FrontFacing_001_to_001.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": "../default/default.frag"
+ },
+ "model": "frontbacksquare",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_FrontFacing_frag.frag"
+ },
+ "name": "gl_FrontFacing_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag
new file mode 100644
index 0000000000..f4143574bc
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.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
+void main(void)
+{
+ if(gl_FrontFacing)
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+ else
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/input.run.txt b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/input.run.txt
new file mode 100644
index 0000000000..6244419195
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/ogles/GL/gl_FrontFacing/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+gl_FrontFacing_001_to_001.html