Backed out changeset 8fc3326bce7f (bug 1943032) for causing failures at browser_tab_g...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance2 / glsl3 / shader-linking.html
blob6210e0577b034cffca6aec8547e132404aa47787
1 <!--
2 Copyright (c) 2019 The Khronos Group Inc.
3 Use of this source code is governed by an MIT-style license that can be
4 found in the LICENSE.txt file.
5 -->
7 <!DOCTYPE html>
8 <html>
9 <head>
10 <meta charset="utf-8">
11 <title>OpenGL ES Shading Language 1.00 and OpenGL ES Shading Language 3.00 shaders should not link with each other</title>
12 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
13 <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
14 <script src="../../js/js-test-pre.js"></script>
15 <script src="../../js/webgl-test-utils.js"></script>
16 <script src="../../js/glsl-conformance-test.js"></script>
17 </head>
18 <body>
19 <div id="description"></div>
20 <div id="console"></div>
21 <script id="ES3VertexShader" type="x-shader/x-vertex">#version 300 es
22 precision mediump float;
23 in vec4 aPosition;
25 void main() {
26 gl_Position = aPosition;
28 </script>
29 <script id="ES3FragmentShader" type="x-shader/x-fragment">#version 300 es
30 precision mediump float;
31 out vec4 my_FragColor;
32 void main() {
33 my_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
35 </script>
36 <script id="ESSL1VertexShader" type="x-shader/x-vertex">
37 precision mediump float;
38 attribute vec4 aPosition;
40 void main() {
41 gl_Position = aPosition;
43 </script>
44 <script id="ESSL1FragmentShader" type="x-shader/x-fragment">
45 precision mediump float;
47 void main() {
48 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
50 </script>
51 <script type="application/javascript">
52 "use strict";
53 description();
54 // See OpenGL ES Shading Language 3.00 spec section 1.5 or 3.3
55 GLSLConformanceTester.runTests([
57 vShaderId: "ES3VertexShader",
58 vShaderSuccess: true,
59 fShaderId: "ES3FragmentShader",
60 fShaderSuccess: true,
61 linkSuccess: true,
62 passMsg: "OpenGL ES Shading Language 3.00 vertex shader should link with OpenGL ES Shading Language 3.00 fragment shader."
65 vShaderId: "ES3VertexShader",
66 vShaderSuccess: true,
67 fShaderId: "ESSL1FragmentShader",
68 fShaderSuccess: true,
69 linkSuccess: false,
70 passMsg: "OpenGL ES Shading Language 3.00 vertex shader should not link with OpenGL ES Shading Language 1.00 fragment shader."
73 vShaderId: "ESSL1VertexShader",
74 vShaderSuccess: true,
75 fShaderId: "ES3FragmentShader",
76 fShaderSuccess: true,
77 linkSuccess: false,
78 passMsg: "OpenGL ES Shading Language 1.00 vertex shader should not link with OpenGL ES Shading Language 3.00 fragment shader."
80 ], 2);
81 var successfullyParsed = true;
82 </script>
83 </body>
84 </html>