| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| index f8311fab654685130123812ad0743ced7e5d4cf9..81cc8b5980bff7115d1aac95b4ec6d9b8e9a2c95 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| @@ -2184,6 +2184,7 @@ void WebGLRenderingContextBase::disableVertexAttribArray(GLuint index)
|
| return;
|
| }
|
|
|
| + m_boundVertexArrayObject->setAttribEnabled(index, false);
|
| contextGL()->DisableVertexAttribArray(index);
|
| }
|
|
|
| @@ -2216,6 +2217,11 @@ void WebGLRenderingContextBase::drawArrays(GLenum mode, GLint first, GLsizei cou
|
| if (!validateDrawArrays("drawArrays"))
|
| return;
|
|
|
| + if (!m_boundVertexArrayObject->isAllEnabledAttribBufferBound()) {
|
| + synthesizeGLError(GL_INVALID_OPERATION, "drawArrays", "no buffer is bound to enabled attribute");
|
| + return;
|
| + }
|
| +
|
| ScopedRGBEmulationColorMask emulationColorMask(contextGL(), m_colorMask, m_drawingBuffer.get());
|
| clearIfComposited();
|
| contextGL()->DrawArrays(mode, first, count);
|
| @@ -2227,6 +2233,11 @@ void WebGLRenderingContextBase::drawElements(GLenum mode, GLsizei count, GLenum
|
| if (!validateDrawElements("drawElements", type, offset))
|
| return;
|
|
|
| + if (!m_boundVertexArrayObject->isAllEnabledAttribBufferBound()) {
|
| + synthesizeGLError(GL_INVALID_OPERATION, "drawElements", "no buffer is bound to enabled attribute");
|
| + return;
|
| + }
|
| +
|
| if (transformFeedbackActive() && !transformFeedbackPaused()) {
|
| synthesizeGLError(GL_INVALID_OPERATION, "drawElements", "transform feedback is active and not paused");
|
| return;
|
| @@ -2243,6 +2254,11 @@ void WebGLRenderingContextBase::drawArraysInstancedANGLE(GLenum mode, GLint firs
|
| if (!validateDrawArrays("drawArraysInstancedANGLE"))
|
| return;
|
|
|
| + if (!m_boundVertexArrayObject->isAllEnabledAttribBufferBound()) {
|
| + synthesizeGLError(GL_INVALID_OPERATION, "drawArraysInstancedANGLE", "no buffer is bound to enabled attribute");
|
| + return;
|
| + }
|
| +
|
| ScopedRGBEmulationColorMask emulationColorMask(contextGL(), m_colorMask, m_drawingBuffer.get());
|
| clearIfComposited();
|
| contextGL()->DrawArraysInstancedANGLE(mode, first, count, primcount);
|
| @@ -2254,6 +2270,11 @@ void WebGLRenderingContextBase::drawElementsInstancedANGLE(GLenum mode, GLsizei
|
| if (!validateDrawElements("drawElementsInstancedANGLE", type, offset))
|
| return;
|
|
|
| + if (!m_boundVertexArrayObject->isAllEnabledAttribBufferBound()) {
|
| + synthesizeGLError(GL_INVALID_OPERATION, "drawElementsInstancedANGLE", "no buffer is bound to enabled attribute");
|
| + return;
|
| + }
|
| +
|
| ScopedRGBEmulationColorMask emulationColorMask(contextGL(), m_colorMask, m_drawingBuffer.get());
|
| clearIfComposited();
|
| contextGL()->DrawElementsInstancedANGLE(mode, count, type, reinterpret_cast<void*>(static_cast<intptr_t>(offset)), primcount);
|
| @@ -2285,6 +2306,7 @@ void WebGLRenderingContextBase::enableVertexAttribArray(GLuint index)
|
| return;
|
| }
|
|
|
| + m_boundVertexArrayObject->setAttribEnabled(index, true);
|
| contextGL()->EnableVertexAttribArray(index);
|
| }
|
|
|
|
|