Bug 1945965 – remove new tab April Fools logo. r=home-newtab-reviewers,reemhamz
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / glsl / bugs / invariant-does-not-leak-across-shaders.html
blobd20373101280a8728d9614793ab5e38235df64c7
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>Invariant does not leak across shaders</title>
12 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
13 <script src="../../../js/js-test-pre.js"></script>
14 <script src="../../../js/webgl-test-utils.js"></script>
15 <script src="../../../js/glsl-conformance-test.js"></script>
16 </head>
17 <body>
18 <div id="description"></div>
19 <div id="console"></div>
20 <script id="InvariantVertex" type="x-shader/x-vertex">
21 varying vec4 v_varying;
22 invariant v_varying;
24 void main()
26 gl_Position = v_varying;
28 </script>
29 <script id="InvariantFragment" type="x-shader/x-fragment">
30 precision mediump float;
31 invariant varying vec4 v_varying;
33 void main()
35 gl_FragColor = v_varying;
37 </script>
38 <script id="VertexWithVarying" type="x-shader/x-vertex">
39 varying vec4 v_varying;
41 void main() {
42 gl_Position = v_varying;
44 </script>
45 <script type="text/javascript">
46 "use strict";
47 description("The use of the invariant qualifier in one shader must not affect other shaders.");
49 debug("");
50 debug("This is a deliberate subset of conformance/glsl/misc/shaders-with-invariance.html.");
51 debug("Compared with the original tests, order of the tests is different.");
52 debug("This test covers an ANGLE bug. See crbug.com/634813.");
54 GLSLConformanceTester.runTests([
56 vShaderId: "InvariantVertex",
57 vShaderSuccess: true,
58 fShaderId: "InvariantFragment",
59 fShaderSuccess: true,
60 linkSuccess: true,
61 passMsg: "Shaders using invariant qualifier should compile and link."
64 vShaderId: "VertexWithVarying",
65 vShaderSuccess: true,
66 fShaderId: "InvariantFragment",
67 fShaderSuccess: true,
68 linkSuccess: false,
69 passMsg: "vertex shader with variant varying and fragment shader with invariant varying must fail"
71 ]);
72 </script>
73 </body>
74 </html>