Browse Source

GL: add a repro case for base/range buffer unbind state mismatch.

Expands the test added in 789c52fd8a, for
which a fix was done in 8f6f4053fc but
which forgot to handle the case where a buffer is unbound. The test now
fails with an invalid error.
pull/638/head
Vladimír Vondruš 2 years ago
parent
commit
57b6f1e55a
  1. 13
      src/Magnum/GL/Test/BufferGLTest.cpp

13
src/Magnum/GL/Test/BufferGLTest.cpp

@ -352,6 +352,19 @@ void BufferGLTest::bindBaseRangeUpdateRegularBinding() {
large.setSubData(0, zeros);
MAGNUM_VERIFY_NO_GL_ERROR();
/* Conversely, unbinding the indexed target then resets the regular binding
point as a side effect. Again verify that the state tracker accounts for
that by trying to upload data to the same buffer again -- it should
rebind it instead of assuming it's still there. */
if(data.multi)
Buffer::unbind(Buffer::Target::Uniform, 0, 1);
else
Buffer::unbind(Buffer::Target::Uniform, 0);
large.setSubData(0, zeros);
MAGNUM_VERIFY_NO_GL_ERROR();
}
#ifndef MAGNUM_TARGET_WEBGL

Loading…
Cancel
Save