Bug 1918529 - fix some subpixel misalignment issues with gfx.webrender.svg-filter...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / glsl / bugs / qualcomm-loop-with-continue-crash.html
blobff94c522685a3e4ce8db0cb6147b191a5d338f52
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 -->
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 ()
19 </script>
20 <script id='fshader1' type='x-shader/x-fragment'>
21 void main ()
23 int count1 = 0, count2 = 0;
24 for(int i=0;i<4;i++)
26 if(count1 == 2)
27 continue;
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>");
39 debug("");
41 var wtu = WebGLTestUtils;
42 var gl = wtu.create3DContext();
44 gl.canvas.addEventListener("webglcontextlost", function(e) {
45 testFailed("WebGL context lost");
46 });
48 if (!gl) {
49 testFailed("WebGL context does not exist");
50 } else {
51 testPassed("WebGL context exists");
52 debug("");
54 var program1 = wtu.setupProgram(gl, ['vshader1', 'fshader1']);
55 if (!gl.getProgramParameter(program1, gl.LINK_STATUS)) {
56 testFailed("Program failed to link");
58 wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
60 debug("");
63 // Cycle through a rAF once to give any webglcontextlost events a chance to propagate
64 window.requestAnimationFrame(function() { finishTest(); });
66 debug("");
67 var successfullyParsed = true;
68 </script>
70 </body>
71 </html>