tor-browser

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

angle-instanced-arrays-out-of-bounds.html (2129B)


      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 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
     12 <script src="../../js/js-test-pre.js"></script>
     13 <script src="../../js/webgl-test-utils.js"></script>
     14 <script src="../../js/tests/out-of-bounds-test.js"></script>
     15 </head>
     16 <body>
     17 <div id="description"></div>
     18 <div id="console"></div>
     19 
     20 <script>
     21 "use strict";
     22 description("Test of drawArraysInstancedANGLE and drawElementsInstancedANGLE with out-of-bounds parameters");
     23 
     24 var wtu = WebGLTestUtils;
     25 
     26 var gl = wtu.create3DContext();
     27 var ext = wtu.getExtensionWithKnownPrefixes(gl, "ANGLE_instanced_arrays");
     28 if (!ext) {
     29    testPassed("No ANGLE_instanced_arrays support -- this is legal");
     30 } else {
     31    testPassed("Successfully enabled ANGLE_instanced_arrays extension");
     32    debug("");
     33    debug("Test with 1 instance without instanced attributes");
     34    debug("");
     35    OutOfBoundsTest.runDrawArraysTest("ext.drawArraysInstancedANGLE(gl.TRIANGLES, $(offset), $(count), 1)", gl, wtu, ext);
     36    debug("");
     37    OutOfBoundsTest.runDrawElementsTest("ext.drawElementsInstancedANGLE(gl.TRIANGLES, $(count), $(type), $(offset), 1)", gl, wtu, ext);
     38    debug("");
     39    debug("Test with 2 instances without instanced attributes");
     40    debug("");
     41    OutOfBoundsTest.runDrawArraysTest("ext.drawArraysInstancedANGLE(gl.TRIANGLES, $(offset), $(count), 2)", gl, wtu, ext);
     42    debug("");
     43    OutOfBoundsTest.runDrawElementsTest("ext.drawElementsInstancedANGLE(gl.TRIANGLES, $(count), $(type), $(offset), 2)", gl, wtu, ext);
     44    debug("");
     45    OutOfBoundsTest.runDrawArraysInstancedTest("ext.drawArraysInstancedANGLE(gl.TRIANGLES, $(offset), $(count), $(primcount))", gl, wtu, ext);
     46    debug("");
     47    OutOfBoundsTest.runDrawElementsInstancedTest("ext.drawElementsInstancedANGLE(gl.TRIANGLES, $(count), $(type), $(offset), $(primcount))", gl, wtu, ext);
     48    debug("");
     49 }
     50 
     51 var successfullyParsed = true;
     52 </script>
     53 
     54 <script src="../../js/js-test-post.js"></script>
     55 </body>
     56 </html>