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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include <GLES2/gl2extchromium.h> 10 #include <GLES2/gl2extchromium.h>
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 default: 1544 default:
1545 break; 1545 break;
1546 } 1546 }
1547 helper_->PixelStorei(pname, param); 1547 helper_->PixelStorei(pname, param);
1548 CheckGLError(); 1548 CheckGLError();
1549 } 1549 }
1550 1550
1551 void GLES2Implementation::VertexAttribIPointer( 1551 void GLES2Implementation::VertexAttribIPointer(
1552 GLuint index, GLint size, GLenum type, GLsizei stride, const void* ptr) { 1552 GLuint index, GLint size, GLenum type, GLsizei stride, const void* ptr) {
1553 GPU_CLIENT_SINGLE_THREAD_CHECK(); 1553 GPU_CLIENT_SINGLE_THREAD_CHECK();
1554 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttribPointer(" 1554 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttribIPointer("
1555 << index << ", " 1555 << index << ", "
1556 << size << ", " 1556 << size << ", "
1557 << GLES2Util::GetStringVertexAttribType(type) << ", " 1557 << GLES2Util::GetStringVertexAttribIType(type) << ", "
1558 << stride << ", " 1558 << stride << ", "
1559 << ptr << ")"); 1559 << ptr << ")");
1560 helper_->VertexAttribIPointer(index, size, type, stride, ToGLuint(ptr)); 1560 // Record the info on the client side.
1561 if (!vertex_array_object_manager_->SetAttribPointer(
1562 bound_array_buffer_id_, index, size, type, GL_FALSE, stride, ptr)) {
1563 SetGLError(GL_INVALID_OPERATION, "glVertexAttribIPointer",
1564 "client side arrays are not allowed in vertex array objects.");
1565 return;
1566 }
1567 if (!support_client_side_arrays_ || bound_array_buffer_id_ != 0) {
1568 // Only report NON client side buffers to the service.
1569 if (!ValidateOffset("glVertexAttribIPointer",
1570 reinterpret_cast<GLintptr>(ptr))) {
1571 return;
1572 }
1573 helper_->VertexAttribIPointer(index, size, type, stride, ToGLuint(ptr));
1574 }
1561 CheckGLError(); 1575 CheckGLError();
1562 } 1576 }
1563 1577
1564 void GLES2Implementation::VertexAttribPointer( 1578 void GLES2Implementation::VertexAttribPointer(
1565 GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, 1579 GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride,
1566 const void* ptr) { 1580 const void* ptr) {
1567 GPU_CLIENT_SINGLE_THREAD_CHECK(); 1581 GPU_CLIENT_SINGLE_THREAD_CHECK();
1568 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttribPointer(" 1582 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glVertexAttribPointer("
1569 << index << ", " 1583 << index << ", "
1570 << size << ", " 1584 << size << ", "
(...skipping 3799 matching lines...) Expand 10 before | Expand all | Expand 10 after
5370 CheckGLError(); 5384 CheckGLError();
5371 } 5385 }
5372 5386
5373 // Include the auto-generated part of this file. We split this because it means 5387 // Include the auto-generated part of this file. We split this because it means
5374 // we can easily edit the non-auto generated parts right here in this file 5388 // we can easily edit the non-auto generated parts right here in this file
5375 // instead of having to edit some template or the code generator. 5389 // instead of having to edit some template or the code generator.
5376 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 5390 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
5377 5391
5378 } // namespace gles2 5392 } // namespace gles2
5379 } // namespace gpu 5393 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698