struct-with-single-member-constructor.html (1171B)
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 --> 6 7 <!DOCTYPE html> 8 <html> 9 <head> 10 <meta charset="utf-8"> 11 <title>GLSL struct with a single member constructor 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="fshader" type="x-shader/x-fragment"> 21 #version 100 22 23 precision mediump float; 24 25 struct S { 26 mat2 rotation; 27 }; 28 void main(void) 29 { 30 float angle = 1.0; 31 S(mat2(1.0, angle, 1.0, 1.0)); 32 } 33 </script> 34 <script> 35 "use strict"; 36 description(); 37 debug("This is a regression test for <a href='https://bugs.chromium.org/p/swiftshader/issues/detail?id=56'>Swiftshader bug 56</a>."); 38 debug(""); 39 40 GLSLConformanceTester.runTests([ 41 { 42 fShaderId: 'fshader', 43 fShaderSuccess: true, 44 linkSuccess: true, 45 passMsg: "Construct a struct with a single matrix member" 46 } 47 ]); 48 49 </script> 50 51 </body> 52 </html>