Bug 1918529 - fix some subpixel misalignment issues with gfx.webrender.svg-filter...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / glsl / misc / ternary-operator-on-arrays.html
blobadeddc5e3325544e532de63502b54f03ca543e18
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>WebGL GLSL Conformance Tests - Ternary operator on arrays</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 <script id="fshader-array-ternary-operator" type="x-shader/x-fragment">
22 precision mediump float;
23 void main()
25 float a[3];
26 float b[3];
27 float c[3] = true ? a : b;
29 </script>
30 <script id="fshader-struct-array-ternary-operator" type="x-shader/x-fragment">
31 precision mediump float;
32 struct MyStruct {
33 bool a[3];
36 void main()
38 MyStruct b;
39 MyStruct c;
40 MyStruct d = true ? b : c;
42 </script>
43 <script>
44 "use strict";
45 description("Checks ternary operators for structs and arrays.");
47 GLSLConformanceTester.runTests([
48 { fShaderId: 'fshader-array-ternary-operator',
49 fShaderSuccess: false,
50 linkSuccess: false,
51 passMsg: "Using ternary operators with arrays is not allowed",
53 { fShaderId: 'fshader-struct-array-ternary-operator',
54 fShaderSuccess: false,
55 linkSuccess: false,
56 passMsg: "By implication, using ternary operators with structs containing arrays is not allowed",
58 ]);
60 debug("");
61 var successfullyParsed = true;
62 </script>
63 </body>
64 </html>