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 equality test with structs containing arrays
</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>
21 Structure array comparisons are detailed in the ESSL 3.00 spec section 5.7
23 <script id=
"fshader-same-struct" type=
"x-shader/x-fragment">#version
300 es
24 precision mediump float;
40 color = b == c ? vec4(
0,
1.0,
0,
1.0) : vec4(
1.0,
0,
0,
1.0);
43 <script id=
"fshader-different-struct" type=
"x-shader/x-fragment">#version
300 es
44 precision mediump float;
60 color = b != c ? vec4(
0,
1.0,
0,
1.0) : vec4(
1.0,
0,
0,
1.0);
63 <script type=
"application/javascript">
65 description(
"Comparing structs containing arrays should work.");
68 GLSLConformanceTester.runRenderTests([
70 fShaderId: 'fshader-same-struct',
73 passMsg: 'Comparing two structs containing arrays with the same values should equal to each other'
76 fShaderId: 'fshader-different-struct',
79 passMsg: 'Comparing two structs containing arrays with different values should not equal to each other'