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

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

Issue 5991012: Make glVertexAttribPointer return INVALID_OPERATION for offsets... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('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
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder.cc (revision 70525)
+++ gpu/command_buffer/service/gles2_cmd_decoder.cc (working copy)
@@ -4684,7 +4684,7 @@
return error::kNoError;
}
if (!validators_->vertex_attrib_size.IsValid(size)) {
- SetGLError(GL_INVALID_ENUM,
+ SetGLError(GL_INVALID_VALUE,
"glVertexAttribPointer: size GL_INVALID_VALUE");
return error::kNoError;
}
@@ -4708,9 +4708,14 @@
return error::kNoError;
}
GLsizei component_size =
- GLES2Util::GetGLTypeSizeForTexturesAndBuffers(type);
+ GLES2Util::GetGLTypeSizeForTexturesAndBuffers(type);
if (offset % component_size > 0) {
- SetGLError(GL_INVALID_VALUE,
+ SetGLError(GL_INVALID_OPERATION,
+ "glVertexAttribPointer: offset not valid for type");
+ return error::kNoError;
+ }
+ if (stride % component_size > 0) {
+ SetGLError(GL_INVALID_OPERATION,
"glVertexAttribPointer: stride not valid for type");
return error::kNoError;
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698