| Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
| index 67204a9facc19aa68490ebbe714478df25078954..82c76cc9c197bad0066aa11471c5b073f8ba77a0 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
| @@ -1513,6 +1513,11 @@ void WebGL2RenderingContextBase::drawArraysInstanced(GLenum mode, GLint first, G
|
| if (!validateDrawArrays("drawArraysInstanced"))
|
| return;
|
|
|
| + if (!m_boundVertexArrayObject->isAllEnabledAttribBufferBound()) {
|
| + synthesizeGLError(GL_INVALID_OPERATION, "drawArraysInstanced", "no buffer is bound to enabled attribute");
|
| + return;
|
| + }
|
| +
|
| ScopedRGBEmulationColorMask emulationColorMask(contextGL(), m_colorMask, m_drawingBuffer.get());
|
| clearIfComposited();
|
| contextGL()->DrawArraysInstancedANGLE(mode, first, count, instanceCount);
|
| @@ -1524,6 +1529,11 @@ void WebGL2RenderingContextBase::drawElementsInstanced(GLenum mode, GLsizei coun
|
| if (!validateDrawElements("drawElementsInstanced", type, offset))
|
| return;
|
|
|
| + if (!m_boundVertexArrayObject->isAllEnabledAttribBufferBound()) {
|
| + synthesizeGLError(GL_INVALID_OPERATION, "drawElementsInstanced", "no buffer is bound to enabled attribute");
|
| + return;
|
| + }
|
| +
|
| if (transformFeedbackActive() && !transformFeedbackPaused()) {
|
| synthesizeGLError(GL_INVALID_OPERATION, "drawElementsInstanced", "transform feedback is active and not paused");
|
| return;
|
| @@ -1540,6 +1550,11 @@ void WebGL2RenderingContextBase::drawRangeElements(GLenum mode, GLuint start, GL
|
| if (!validateDrawElements("drawRangeElements", type, offset))
|
| return;
|
|
|
| + if (!m_boundVertexArrayObject->isAllEnabledAttribBufferBound()) {
|
| + synthesizeGLError(GL_INVALID_OPERATION, "drawRangeElements", "no buffer is bound to enabled attribute");
|
| + return;
|
| + }
|
| +
|
| if (transformFeedbackActive() && !transformFeedbackPaused()) {
|
| synthesizeGLError(GL_INVALID_OPERATION, "drawRangeElements", "transform feedback is active and not paused");
|
| return;
|
|
|