tor-browser

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

qualcomm-loop-with-continue-crash.html (1782B)


      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>Qualcomm loop with continue crash 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 id='vshader1' type='x-shader/x-vertex'>
     16 void main ()
     17 {
     18 }
     19 </script>
     20 <script id='fshader1' type='x-shader/x-fragment'>
     21 void main ()
     22 {
     23    int count1 = 0, count2 = 0;
     24    for(int i=0;i<4;i++)
     25    {
     26        if(count1 == 2)
     27            continue;
     28    }
     29 }
     30 </script>
     31 </head>
     32 <body>
     33 <div id="description"></div>
     34 <div id="console"></div>
     35 <script>
     36 "use strict";
     37 description("This test exercises a crash on Adreno 300 series GPUs when compiling certain loop constructs. <a href='https://code.google.com/p/chromium/issues/detail?id=527761'>crbug.com/527761</a>");
     38 
     39 debug("");
     40 
     41 var wtu = WebGLTestUtils;
     42 var gl = wtu.create3DContext();
     43 
     44 gl.canvas.addEventListener("webglcontextlost", function(e) {
     45   testFailed("WebGL context lost");
     46 });
     47 
     48 if (!gl) {
     49    testFailed("WebGL context does not exist");
     50 } else {
     51    testPassed("WebGL context exists");
     52    debug("");
     53 
     54    var program1 = wtu.setupProgram(gl, ['vshader1', 'fshader1']);
     55    if (!gl.getProgramParameter(program1, gl.LINK_STATUS)) {
     56        testFailed("Program failed to link");
     57    }
     58    wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
     59 
     60    debug("");
     61 }
     62 
     63 // Cycle through a rAF once to give any webglcontextlost events a chance to propagate
     64 window.requestAnimationFrame(function() { finishTest(); });
     65 
     66 debug("");
     67 var successfullyParsed = true;
     68 </script>
     69 
     70 </body>
     71 </html>