content/canvas/test/webgl-conformance/extra/simulated-attrib-0-bug-test.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial