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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 9570023: Fails glLinkProgram if two glBindAttribLocation conflicts. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/service/program_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 3784 matching lines...) Expand 10 before | Expand all | Expand 10 after
3795 GLuint program, GLuint index, const char* name) { 3795 GLuint program, GLuint index, const char* name) {
3796 if (!StringIsValidForGLES(name)) { 3796 if (!StringIsValidForGLES(name)) {
3797 SetGLError(GL_INVALID_VALUE, "glBindAttribLocation: Invalid character"); 3797 SetGLError(GL_INVALID_VALUE, "glBindAttribLocation: Invalid character");
3798 return; 3798 return;
3799 } 3799 }
3800 ProgramManager::ProgramInfo* info = GetProgramInfoNotShader( 3800 ProgramManager::ProgramInfo* info = GetProgramInfoNotShader(
3801 program, "glBindAttribLocation"); 3801 program, "glBindAttribLocation");
3802 if (!info) { 3802 if (!info) {
3803 return; 3803 return;
3804 } 3804 }
3805 info->SetAttribLocationBinding(name, static_cast<GLint>(index));
3805 glBindAttribLocation(info->service_id(), index, name); 3806 glBindAttribLocation(info->service_id(), index, name);
3806 } 3807 }
3807 3808
3808 error::Error GLES2DecoderImpl::HandleBindAttribLocation( 3809 error::Error GLES2DecoderImpl::HandleBindAttribLocation(
3809 uint32 immediate_data_size, const gles2::BindAttribLocation& c) { 3810 uint32 immediate_data_size, const gles2::BindAttribLocation& c) {
3810 GLuint program = static_cast<GLuint>(c.program); 3811 GLuint program = static_cast<GLuint>(c.program);
3811 GLuint index = static_cast<GLuint>(c.index); 3812 GLuint index = static_cast<GLuint>(c.index);
3812 uint32 name_size = c.data_size; 3813 uint32 name_size = c.data_size;
3813 const char* name = GetSharedMemoryAs<const char*>( 3814 const char* name = GetSharedMemoryAs<const char*>(
3814 c.name_shm_id, c.name_shm_offset, name_size); 3815 c.name_shm_id, c.name_shm_offset, name_size);
(...skipping 4393 matching lines...) Expand 10 before | Expand all | Expand 10 after
8208 } 8209 }
8209 } 8210 }
8210 8211
8211 // Include the auto-generated part of this file. We split this because it means 8212 // Include the auto-generated part of this file. We split this because it means
8212 // we can easily edit the non-auto generated parts right here in this file 8213 // we can easily edit the non-auto generated parts right here in this file
8213 // instead of having to edit some template or the code generator. 8214 // instead of having to edit some template or the code generator.
8214 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 8215 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
8215 8216
8216 } // namespace gles2 8217 } // namespace gles2
8217 } // namespace gpu 8218 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/program_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698