1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/canvas/test/webgl-conformance/extra/simulated-attrib-0-bug-test.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 +<meta charset="utf-8"> 1.8 +<title>Simulated Attrib 0 Bug Test</title> 1.9 +<script src="../resources/js-test-pre.js"></script> 1.10 +<script src="../conformance/resources/webgl-test.js"></script> 1.11 +</head> 1.12 +<body> 1.13 +<div>Simulated Attrib 0 Bug Test</div> 1.14 +<div id="description"></div> 1.15 +<div id="console"></div> 1.16 +<script> 1.17 +var context = create3DContext(); 1.18 +var program = loadStandardProgram(context); 1.19 + 1.20 +context.useProgram(program); 1.21 +debug("This line attempts to draw with 0x7FFFFFFF triangles with attrib 0 off"); 1.22 +debug("A buggy simulated attrib 0 impl will probably mult 0x7FFFFFFF * sizeof(vec4)"); 1.23 +shouldBe("context.drawArrays(context.TRIANGLES, 0, 0x7fffffff);", "undefined"); 1.24 +debug("This line attempts to draw with 0x7ffffff triangles."); 1.25 +debug("A buggy simulated attrib 0 impl will probably pass 0x7FFFFFF0 to glBufferData and then not check that it failed"); 1.26 +shouldBe("context.drawArrays(context.TRIANGLES, 0, 0x7ffffff);", "undefined"); 1.27 +debug("") 1.28 +debug("NOTE!: You may not see any manifestation here. Check your impl for these issues"); 1.29 +</script> 1.30 +</body> 1.31 +</html> 1.32 +