Backed out changeset 7272b7396c78 (bug 1932758) for causing fenix debug failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance2 / glsl3 / array-initialize-with-same-name-array.html
blobcf81f84dd03b47d8f49c5e07f31c0567042f7dc8
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>GLSL array initializer that references an array with the same name</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="fshaderInitArray" type="x-shader/x-fragment">#version 300 es
21 precision highp float;
22 out vec4 my_FragColor;
24 void main()
26 float foo[2] = float[2](1.0, 1.0);
28 float foo[2] = foo;
29 my_FragColor = vec4(0.0, foo[0], 0.0, foo[1]);
32 </script>
33 <script type="application/javascript">
34 "use strict";
35 description("Initializing an array with another array with the same name should work. See GLSL ES 3.00.6 section 4.2.2.");
37 GLSLConformanceTester.runRenderTests([
39 fShaderId: 'fshaderInitArray',
40 fShaderSuccess: true,
41 linkSuccess: true,
42 passMsg: 'Array that is initialized with an array of the same name from an outer scope'
44 ], 2);
45 </script>
46 </body>
47 </html>