diff options
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation.cc')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 71f768d..641a19e 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -1191,10 +1191,6 @@ void GLES2Implementation::ShaderSource( void GLES2Implementation::BufferDataHelper( GLenum target, GLsizeiptr size, const void* data, GLenum usage) { - if (size == 0) { - return; - } - if (size < 0) { SetGLError(GL_INVALID_VALUE, "glBufferData", "size < 0"); return; @@ -1224,6 +1220,10 @@ void GLES2Implementation::BufferDataHelper( return; } + if (size == 0) { + return; + } + // If there is no data just send BufferData if (!data) { helper_->BufferData(target, size, 0, 0, usage); |