diff options
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; |