Skip to content

Commit

Permalink
Do not leak state between adjacent XFB tests (#3675)
Browse files Browse the repository at this point in the history
Unbind the buffer from the COPY_WRITE_BUFFER target
so that it is bound only as XFB for the next test.
  • Loading branch information
lexaknyazev committed Jul 26, 2024
1 parent 4913174 commit d47f2cc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "copyBufferSubData with double bound buffer");
gl.copyBufferSubData(gl.COPY_READ_BUFFER, gl.COPY_WRITE_BUFFER, 0, 0, 1);
wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "copyBufferSubData with double bound buffer");
gl.bindBuffer(gl.COPY_WRITE_BUFFER, null);

debug("<hr/>Test that rejected operations do not change the bound buffer size");

Expand All @@ -312,7 +313,7 @@

gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, null);
gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint8Array(16));
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "bufferSubData should succeed");
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "bufferSubData should succeed now that not double-bound");
gl.bindBuffer(gl.ARRAY_BUFFER, null);

debug("<hr/>Test bufferData family with tf object unbound");
Expand Down

0 comments on commit d47f2cc

Please sign in to comment.