tor-browser

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

simulated-attrib-0-bug-test.html (1256B)


      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 <!DOCTYPE html>
      7 <html>
      8 <head>
      9 <meta charset="utf-8">
     10 <title>Simulated Attrib 0 Bug Test</title>
     11 <script src="../js/js-test-pre.js"></script>
     12 <script src="../js/webgl-test-utils.js"></script>
     13 </head>
     14 <body>
     15 <div>Simulated Attrib 0 Bug Test</div>
     16 <div id="description"></div>
     17 <div id="console"></div>
     18 <script>
     19 "use strict";
     20 var wtu = WebGLTestUtils;
     21 var context = wtu.create3DContext();
     22 var program = wtu.loadStandardProgram(context);
     23 
     24 context.useProgram(program);
     25 debug("This line attempts to draw with 0x7FFFFFFF triangles with attrib 0 off");
     26 debug("A buggy simulated attrib 0 impl will probably mult 0x7FFFFFFF * sizeof(vec4)");
     27 shouldBe("context.drawArrays(context.TRIANGLES, 0, 0x7fffffff);", "undefined");
     28 debug("This line attempts to draw with 0x7ffffff triangles.");
     29 debug("A buggy simulated attrib 0 impl will probably pass 0x7FFFFFF0 to glBufferData and then not check that it failed");
     30 shouldBe("context.drawArrays(context.TRIANGLES, 0, 0x7ffffff);", "undefined");
     31 debug("")
     32 debug("NOTE!: You may not see any manifestation here. Check your impl for these issues");
     33 </script>
     34 </body>
     35 </html>