Backed out changeset 7272b7396c78 (bug 1932758) for causing fenix debug failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance2 / glsl3 / invalid-default-precision.html
blob375c95610c54a8766a4769c80fcfadbf213eb95e
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>Default precision qualifiers should only work with int, float and sampler types</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 <!-- See ESSL 3.00 section 4.5.4 -->
22 <script id="precisionVec" type="x-shader/x-fragment">#version 300 es
23 precision mediump float;
24 precision mediump vec2;
25 out vec4 my_FragColor;
26 void main() {
27 my_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
29 </script>
30 <script id="precisionVoid" type="x-shader/x-fragment">#version 300 es
31 precision mediump float;
32 precision mediump void;
33 out vec4 my_FragColor;
34 void main() {
35 my_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
37 </script>
38 <script id="precisionUint" type="x-shader/x-fragment">#version 300 es
39 precision mediump float;
40 precision mediump uint;
41 out vec4 my_FragColor;
42 void main() {
43 my_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
45 </script>
46 <script type="application/javascript">
47 "use strict";
48 description();
49 GLSLConformanceTester.runTests([
51 fShaderId: "precisionVec",
52 fShaderSuccess: false,
53 linkSuccess: false,
54 passMsg: "default precision qualifier shouldn't work with vec2"
57 fShaderId: "precisionVoid",
58 fShaderSuccess: false,
59 linkSuccess: false,
60 passMsg: "default precision qualifier shouldn't work with void"
63 fShaderId: "precisionUint",
64 fShaderSuccess: false,
65 linkSuccess: false,
66 passMsg: "default precision qualifier shouldn't work with uint"
68 ], 2);
69 </script>
70 </body>
71 </html>