3 <script src=
"../../../resources/js-test.js"></script>
4 <script src=
"resources/webgl-test.js"></script>
7 <div id=
"description"></div>
8 <div id=
"console"></div>
11 description("Verifies that the array conversion code for WebGLRenderingContext.uniform* does not crash.");
14 for (var i
= 0; i
< 1 << 15; ++i
)
15 array
[i
] = 0x0c0c0c0c;
16 array
.length
= 0x80000000;
18 context
= create3DContext();
19 intProgram
= loadProgram(context
, "resources/intArrayUniformShader2.vert", "resources/noopUniformShader.frag");
20 floatProgram
= loadProgram(context
, "resources/floatArrayUniformShader.vert", "resources/noopUniformShader.frag");
21 intLocation
= context
.getUniformLocation(intProgram
, "u_ints");
22 floatLocation
= context
.getUniformLocation(floatProgram
, "u_floats");
24 context
.useProgram(intProgram
);
26 context
.uniform4iv(intLocation
, array
);
29 context
.useProgram(floatProgram
);
31 context
.uniform4fv(floatLocation
, array
);