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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1088563003: Update vertexAttribIPointer in GPU command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove personal email Created 5 years, 8 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 | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/cmd_buffer_functions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 34b6ecb890fdcd84cdf1e0c3fda24ada60414af6..9d144b52b971a3affb9cb962fab5bdc3c29053d2 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -1551,13 +1551,27 @@ void GLES2Implementation::PixelStorei(GLenum pname, GLint param) {
void GLES2Implementation::VertexAttribIPointer(
GLuint index, GLint size, GLenum type, GLsizei stride, const void* ptr) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
- GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttribPointer("
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttribIPointer("
<< index << ", "
<< size << ", "
- << GLES2Util::GetStringVertexAttribType(type) << ", "
+ << GLES2Util::GetStringVertexAttribIType(type) << ", "
<< stride << ", "
<< ptr << ")");
- helper_->VertexAttribIPointer(index, size, type, stride, ToGLuint(ptr));
+ // Record the info on the client side.
+ if (!vertex_array_object_manager_->SetAttribPointer(
+ bound_array_buffer_id_, index, size, type, GL_FALSE, stride, ptr)) {
+ SetGLError(GL_INVALID_OPERATION, "glVertexAttribIPointer",
+ "client side arrays are not allowed in vertex array objects.");
+ return;
+ }
+ if (!support_client_side_arrays_ || bound_array_buffer_id_ != 0) {
+ // Only report NON client side buffers to the service.
+ if (!ValidateOffset("glVertexAttribIPointer",
+ reinterpret_cast<GLintptr>(ptr))) {
+ return;
+ }
+ helper_->VertexAttribIPointer(index, size, type, stride, ToGLuint(ptr));
+ }
CheckGLError();
}
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/cmd_buffer_functions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698