diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-01 02:22:20 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-01 02:22:20 +0000 |
commit | b4150db95cf1b23e82b6e25b6e4fb72f59673764 (patch) | |
tree | 71718d9d3b40b590222bfb6d1ca29f2c4708ba6a /gpu | |
parent | 100532954477be3fdab303f11ce625c4d780dcd7 (diff) | |
download | chromium_src-b4150db95cf1b23e82b6e25b6e4fb72f59673764.zip chromium_src-b4150db95cf1b23e82b6e25b6e4fb72f59673764.tar.gz chromium_src-b4150db95cf1b23e82b6e25b6e4fb72f59673764.tar.bz2 |
Add logging for shaders that don't compile
BUG=139409
Review URL: https://chromiumcodereview.appspot.com/10824120
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149355 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/program_manager.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc index 1226b1e..48286f4 100644 --- a/gpu/command_buffer/service/program_manager.cc +++ b/gpu/command_buffer/service/program_manager.cc @@ -454,8 +454,6 @@ void ProgramManager::ForceCompileShader(const std::string* source, // We cannot reach here if we are using the shader translator. // All invalid shaders must be rejected by the translator. // All translated shaders must compile. - LOG_IF(ERROR, translator) - << "Shader translator allowed/produced an invalid shader."; GLint max_len = 0; glGetShaderiv(info->service_id(), GL_INFO_LOG_LENGTH, &max_len); scoped_array<char> temp(new char[max_len]); @@ -464,6 +462,12 @@ void ProgramManager::ForceCompileShader(const std::string* source, DCHECK(max_len == 0 || len < max_len); DCHECK(len == 0 || temp[len] == '\0'); info->SetStatus(false, std::string(temp.get(), len).c_str(), NULL); + LOG_IF(ERROR, translator) + << "Shader translator allowed/produced an invalid shader " + << "unless the driver is buggy:" + << "\n--original-shader--\n" << (source ? *source : "") + << "\n--translated-shader--\n" << shader_src + << "\n--info-log--\n" << *info->log_info(); } } |