Backed out changeset 7272b7396c78 (bug 1932758) for causing fenix debug failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance2 / glsl3 / uniform-struct-with-non-square-matrix.html
blob9df7b5a88f8efbf8501a4213ddd64a6cf28abccd
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 uniform struct with a non-square matrix 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>
16 </head>
17 <body>
18 <div id="description"></div>
19 <div id="console"></div>
20 <script id="fshaderUniformStructWithNonSquareMatrixAndBoolean" type="x-shader/x-fragment">#version 300 es
21 precision highp float;
22 out highp vec4 my_color;
23 struct S
25 mat2x4 m;
26 bool b;
28 uniform S uni;
29 void main()
31 my_color = vec4(0, 1, 0, 1);
32 if (!uni.b) { my_color.g = 0.0; }
34 </script>
35 <script type="application/javascript">
36 "use strict";
37 description();
39 GLSLConformanceTester.runRenderTests([
41 fShaderId: 'fshaderUniformStructWithNonSquareMatrixAndBoolean',
42 fShaderSuccess: true,
43 linkSuccess: true,
44 passMsg: 'Set a boolean member in a uniform struct that also contains a non-square-matrix',
45 uniforms: [{name: "uni.b", functionName: "uniform1i", value: 1}]
47 ], 2);
48 </script>
49 </body>
50 </html>