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.
10 <meta charset=
"utf-8">
11 <title>GLSL array assignment test
</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>
18 <div id=
"description"></div>
19 <div id=
"console"></div>
20 <script id=
"fshaderSimple" type=
"x-shader/x-fragment">#version
300 es
21 precision mediump float;
23 out vec4 my_FragColor;
26 // This simple test uses the ESSL1 style array initialization in order
27 // to be able to test array assignment independently of array constructors.
30 for (int i =
0; i <
3; ++i) {
36 for (int i =
0; i <
3; ++i) {
41 my_FragColor = vec4(
0.0, (fail ?
0.0 :
1.0),
0.0,
1.0);
44 <script id=
"fshaderArrayOfStructs" type=
"x-shader/x-fragment">#version
300 es
45 precision mediump float;
47 out vec4 my_FragColor;
54 // This simple test uses the ESSL1 style array initialization in order
55 // to be able to test array assignment independently of array constructors.
58 for (int i =
0; i <
3; ++i) {
64 for (int i =
0; i <
3; ++i) {
69 my_FragColor = vec4(
0.0, (fail ?
0.0 :
1.0),
0.0,
1.0);
72 <script type=
"application/javascript">
74 description(
"Assigning arrays should work.");
76 GLSLConformanceTester.runRenderTests([
78 fShaderId: 'fshaderSimple',
81 passMsg: 'Arrays of integers'
84 fShaderId: 'fshaderArrayOfStructs',
87 passMsg: 'Arrays of structs'