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

Unified Diff: gpu/command_buffer/service/program_manager.cc

Issue 10824120: Add logging for shaders that don't compile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager.cc
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc
index b109be947696aa4e88461ba1801bd97a049adc0c..422e03e4ee5622f5bcb3119f5200b039decbacba 100644
--- a/gpu/command_buffer/service/program_manager.cc
+++ b/gpu/command_buffer/service/program_manager.cc
@@ -439,8 +439,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]);
@@ -449,6 +447,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();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698