Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2610393003: Fix the bug for VertexAttrib{I}Pointer when no array buffer bound (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 3c2f69440091f8020df96bec44979fa8f6892b18..d1eedc6ca86db1426307482880d6ebe9d7c81ce6 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -10909,10 +10909,13 @@ error::Error GLES2DecoderImpl::HandleVertexAttribIPointer(
state_.bound_array_buffer->IsDeleted()) {
if (state_.vertex_attrib_manager.get() ==
state_.default_vertex_attrib_manager.get()) {
- LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glVertexAttribIPointer", "no array buffer bound");
- return error::kNoError;
+ if (offset != 0) {
Zhenyao Mo 2017/01/09 18:21:15 I think you can combine this and the else to a sim
yunchao 2017/01/10 14:10:11 Done.
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_OPERATION,
+ "glVertexAttribIPointer",
+ "no array buffer is bound and offset is non-zero");
+ return error::kNoError;
+ }
} else if (offset != 0) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION,
@@ -11002,10 +11005,13 @@ error::Error GLES2DecoderImpl::HandleVertexAttribPointer(
state_.bound_array_buffer->IsDeleted()) {
if (state_.vertex_attrib_manager.get() ==
state_.default_vertex_attrib_manager.get()) {
- LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glVertexAttribPointer", "no array buffer bound");
- return error::kNoError;
+ if (offset != 0) {
Zhenyao Mo 2017/01/09 18:21:15 Same here.
yunchao 2017/01/10 14:10:11 Done.
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_OPERATION,
+ "glVertexAttribPointer",
+ "no array buffer is bound and offset is non-zero");
+ return error::kNoError;
+ }
} else if (offset != 0) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION,
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698