Commit 58fc54c4 authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

gpu/ texture_upload_perftest.cc: better CheckNoGlError()

This CL teaches CheckNoGlError() in texture_upload_perftest.cc to
dump the GL error as human readable string.

Bug: 920626
Change-Id: I49c9ad3db9f343f0a031a7bce8505f99c6e4b832
Reviewed-on: https://chromium-review.googlesource.com/c/1440521
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Auto-Submit: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627040}
parent 49f99455
...@@ -64,7 +64,9 @@ SHADER( ...@@ -64,7 +64,9 @@ SHADER(
// clang-format on // clang-format on
void CheckNoGlError(const std::string& msg) { void CheckNoGlError(const std::string& msg) {
CHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()) << " " << msg; const GLenum error = glGetError();
CHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), error)
<< msg << " " << gl::GLEnums::GetStringError(error);
} }
// Utility function to compile a shader from a string. // Utility function to compile a shader from a string.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment