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

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

Issue 6242006: Fix for gl programs. An unsuccessful link should report... (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 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 3589 matching lines...) Expand 10 before | Expand all | Expand 10 after
3600 bound_renderbuffer_->SetInfo(0, internalformat, width, height); 3600 bound_renderbuffer_->SetInfo(0, internalformat, width, height);
3601 } 3601 }
3602 } 3602 }
3603 3603
3604 void GLES2DecoderImpl::DoLinkProgram(GLuint program) { 3604 void GLES2DecoderImpl::DoLinkProgram(GLuint program) {
3605 ProgramManager::ProgramInfo* info = GetProgramInfoNotShader( 3605 ProgramManager::ProgramInfo* info = GetProgramInfoNotShader(
3606 program, "glLinkProgram"); 3606 program, "glLinkProgram");
3607 if (!info) { 3607 if (!info) {
3608 return; 3608 return;
3609 } 3609 }
3610
3611 info->ClearLinkStatus();
3610 if (!info->CanLink()) { 3612 if (!info->CanLink()) {
3611 return; 3613 return;
3612 } 3614 }
3615
3613 glLinkProgram(info->service_id()); 3616 glLinkProgram(info->service_id());
3614 GLint success = 0; 3617 GLint success = 0;
3615 glGetProgramiv(info->service_id(), GL_LINK_STATUS, &success); 3618 glGetProgramiv(info->service_id(), GL_LINK_STATUS, &success);
3616 if (success) { 3619 if (success) {
3617 info->Update(); 3620 info->Update();
3618 } else {
3619 info->Reset();
3620 } 3621 }
3621 }; 3622 };
3622 3623
3623 void GLES2DecoderImpl::DoTexParameterf( 3624 void GLES2DecoderImpl::DoTexParameterf(
3624 GLenum target, GLenum pname, GLfloat param) { 3625 GLenum target, GLenum pname, GLfloat param) {
3625 TextureManager::TextureInfo* info = GetTextureInfoForTarget(target); 3626 TextureManager::TextureInfo* info = GetTextureInfoForTarget(target);
3626 if (!info) { 3627 if (!info) {
3627 SetGLError(GL_INVALID_VALUE, "glTexParameterf: unknown texture"); 3628 SetGLError(GL_INVALID_VALUE, "glTexParameterf: unknown texture");
3628 } else { 3629 } else {
3629 texture_manager()->SetParameter( 3630 texture_manager()->SetParameter(
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
6091 return error::kNoError; 6092 return error::kNoError;
6092 } 6093 }
6093 6094
6094 // Include the auto-generated part of this file. We split this because it means 6095 // Include the auto-generated part of this file. We split this because it means
6095 // we can easily edit the non-auto generated parts right here in this file 6096 // we can easily edit the non-auto generated parts right here in this file
6096 // instead of having to edit some template or the code generator. 6097 // instead of having to edit some template or the code generator.
6097 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 6098 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
6098 6099
6099 } // namespace gles2 6100 } // namespace gles2
6100 } // namespace gpu 6101 } // 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