OLD | NEW |
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 4631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4642 buffer.shm_id(), buffer.offset()); | 4642 buffer.shm_id(), buffer.offset()); |
4643 offset += buffer.size(); | 4643 offset += buffer.size(); |
4644 src += buffer.size(); | 4644 src += buffer.size(); |
4645 size -= buffer.size(); | 4645 size -= buffer.size(); |
4646 } | 4646 } |
4647 } | 4647 } |
4648 DCHECK_EQ(total_size.ValueOrDefault(0), offset); | 4648 DCHECK_EQ(total_size.ValueOrDefault(0), offset); |
4649 return true; | 4649 return true; |
4650 } | 4650 } |
4651 | 4651 |
| 4652 void GLES2Implementation::UniformBlockBinding(GLuint program, |
| 4653 GLuint index, |
| 4654 GLuint binding) { |
| 4655 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 4656 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUniformBlockBinding(" << program |
| 4657 << ", " << index << ", " << binding << ")"); |
| 4658 share_group_->program_info_manager()->UniformBlockBinding( |
| 4659 this, program, index, binding); |
| 4660 helper_->UniformBlockBinding(program, index, binding); |
| 4661 CheckGLError(); |
| 4662 } |
| 4663 |
| 4664 |
4652 // Include the auto-generated part of this file. We split this because it means | 4665 // Include the auto-generated part of this file. We split this because it means |
4653 // we can easily edit the non-auto generated parts right here in this file | 4666 // we can easily edit the non-auto generated parts right here in this file |
4654 // instead of having to edit some template or the code generator. | 4667 // instead of having to edit some template or the code generator. |
4655 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 4668 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
4656 | 4669 |
4657 } // namespace gles2 | 4670 } // namespace gles2 |
4658 } // namespace gpu | 4671 } // namespace gpu |
OLD | NEW |