diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 18:35:03 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 18:35:03 +0000 |
commit | 689fa1c501df5063de1f9d1272d58cd8efe5ce1d (patch) | |
tree | b5b637c7572bfc2973e3f6e13e5ebe6b024949f6 /gpu | |
parent | 990b912c5642d3c284da1d2ac3b557e5a161b0fc (diff) | |
download | chromium_src-689fa1c501df5063de1f9d1272d58cd8efe5ce1d.zip chromium_src-689fa1c501df5063de1f9d1272d58cd8efe5ce1d.tar.gz chromium_src-689fa1c501df5063de1f9d1272d58cd8efe5ce1d.tar.bz2 |
Fix for DrawArrays, DrawElements. Removed the check
for an invalid program. The check is already in
UseProgram. If that check passes the program is
"installed" at which point it, even if LinkProgram
is called and fails, marking the program as invalid,
the previously installed program is still in use
until UseProgram is called.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/2770007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index dd0c665..22f226e 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -3007,8 +3007,11 @@ void GLES2DecoderImpl::RestoreStateForNonRenderableTextures() { } bool GLES2DecoderImpl::IsDrawValid(GLuint max_vertex_accessed) { - if (!current_program_ || current_program_->IsDeleted() || - !current_program_->IsValid()) { + // NOTE: We specifically do not check current_program->IsValid() because + // it could never be invalid since glUseProgram would have failed. While + // glLinkProgram could later mark the program as invalid the previous + // valid program will still function if it is still the current program. + if (!current_program_ || current_program_->IsDeleted()) { // The program does not exist. // But GL says no ERROR. return false; |