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.
10 <title>Simulated Attrib
0 Bug Test
</title>
11 <script src=
"../js/js-test-pre.js"></script>
12 <script src=
"../js/webgl-test-utils.js"></script>
15 <div>Simulated Attrib
0 Bug Test
</div>
16 <div id=
"description"></div>
17 <div id=
"console"></div>
20 var wtu
= WebGLTestUtils
;
21 var context
= wtu
.create3DContext();
22 var program
= wtu
.loadStandardProgram(context
);
24 context
.useProgram(program
);
25 debug("This line attempts to draw with 0x7FFFFFFF triangles with attrib 0 off");
26 debug("A buggy simulated attrib 0 impl will probably mult 0x7FFFFFFF * sizeof(vec4)");
27 shouldBe("context.drawArrays(context.TRIANGLES, 0, 0x7fffffff);", "undefined");
28 debug("This line attempts to draw with 0x7ffffff triangles.");
29 debug("A buggy simulated attrib 0 impl will probably pass 0x7FFFFFF0 to glBufferData and then not check that it failed");
30 shouldBe("context.drawArrays(context.TRIANGLES, 0, 0x7ffffff);", "undefined");
32 debug("NOTE!: You may not see any manifestation here. Check your impl for these issues");