tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

struct-nesting-exceeds-maximum.html (1196B)


      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>WebGL GLSL Conformance Tests</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="vertexShader" type="text/something-not-javascript">
     22 // shader with too-deep struct nesting should fail per WebGL spec
     23 struct nesting5 {
     24  vec4 vecfield;
     25 };
     26 
     27 struct nesting4 {
     28  nesting5 field5;
     29 };
     30 
     31 struct nesting3 {
     32  nesting4 field4;
     33 };
     34 
     35 struct nesting2 {
     36  nesting3 field3;
     37 };
     38 
     39 struct nesting1 {
     40  nesting2 field2;
     41 };
     42 
     43 uniform nesting1 uniform1;
     44 void main()
     45 {
     46    gl_Position = uniform1.field2.field3.field4.field5.vecfield;
     47 }
     48 </script>
     49 <script>
     50 "use strict";
     51 GLSLConformanceTester.runTest();
     52 var successfullyParsed = true;
     53 </script>
     54 </body>
     55 </html>