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

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: suppress webgl cts expectation for passthrough cmd buffer 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
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 ae0934b639ac8c8509e41cb0145501e1206a160b..56b5ef233e2816c273cce90d7d993f3803f7c7b4 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -10926,16 +10926,9 @@ error::Error GLES2DecoderImpl::HandleVertexAttribIPointer(
if (!state_.bound_array_buffer.get() ||
state_.bound_array_buffer->IsDeleted()) {
- if (state_.vertex_attrib_manager.get() ==
- state_.default_vertex_attrib_manager.get()) {
+ if (offset != 0) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glVertexAttribIPointer", "no array buffer bound");
- return error::kNoError;
- } else if (offset != 0) {
- LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glVertexAttribIPointer", "client side arrays are not allowed");
+ GL_INVALID_OPERATION, "glVertexAttribIPointer", "offset != 0");
return error::kNoError;
}
}
@@ -11019,16 +11012,9 @@ error::Error GLES2DecoderImpl::HandleVertexAttribPointer(
if (!state_.bound_array_buffer.get() ||
state_.bound_array_buffer->IsDeleted()) {
- if (state_.vertex_attrib_manager.get() ==
- state_.default_vertex_attrib_manager.get()) {
+ if (offset != 0) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glVertexAttribPointer", "no array buffer bound");
- return error::kNoError;
- } else if (offset != 0) {
- LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glVertexAttribPointer", "client side arrays are not allowed");
+ GL_INVALID_OPERATION, "glVertexAttribPointer", "offset != 0");
return error::kNoError;
}
}

Powered by Google App Engine
This is Rietveld 408576698