Skip to content

Commit 023bccf

Browse files
authored
Validate error for out-of-bounds active texture (#3757)
Ensure INVALID_ENUM is generated if selecting beyond the number of supported texture units.
1 parent b74686b commit 023bccf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sdk/tests/conformance/textures/misc/texture-active-bind.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
}
8686
wtu.glErrorShouldBe(gl, gl.NO_ERROR);
8787

88+
// check that OOB returns error
89+
gl.activeTexture(gl.TEXTURE0 + gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS));
90+
wtu.glErrorShouldBe(gl, gl.INVALID_ENUM);
91+
8892
// now use each texture unit to write into the textures,
8993
for (var ii = 0; ii < texunits; ++ii) {
9094
var c = colors[ii];

0 commit comments

Comments
 (0)