Commit 68439854 by Geoff Lang

Fix ASSERT not covering full range of drawbuffer counts.

BUG=angle:841 Change-Id: I59cc281e4848572010cbba3d45382a98063e8db2 Reviewed-on: https://chromium-review.googlesource.com/233210Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 9ad4bda0
...@@ -268,7 +268,7 @@ GLenum Framebuffer::getDrawBufferState(unsigned int colorAttachment) const ...@@ -268,7 +268,7 @@ GLenum Framebuffer::getDrawBufferState(unsigned int colorAttachment) const
void Framebuffer::setDrawBuffers(size_t count, const GLenum *buffers) void Framebuffer::setDrawBuffers(size_t count, const GLenum *buffers)
{ {
ASSERT(count < ArraySize(mDrawBufferStates)); ASSERT(count <= ArraySize(mDrawBufferStates));
std::copy(buffers, buffers + count, mDrawBufferStates); std::copy(buffers, buffers + count, mDrawBufferStates);
std::fill(mDrawBufferStates + count, mDrawBufferStates + ArraySize(mDrawBufferStates), GL_NONE); std::fill(mDrawBufferStates + count, mDrawBufferStates + ArraySize(mDrawBufferStates), GL_NONE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment