Commit 36c938e0 by Geoff Lang Committed by Commit Bot

GL: Ignore warnings about requested extensions not being present.

Some drivers emit warnings about enabled extensions not being present dispite the 'enable' flag only being a request. Supress these warnings to clean up the Chrome console. Also request GL_EXT_gpu_shader5 in addition to GL_ARB_gpu_shader5 to maximize reach. BUG=chromium:1066212 Change-Id: If48cc60b8533f6ffedb727e845a4ca784d98c07c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2129111Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 12b6a82e
......@@ -323,6 +323,7 @@ void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root, ShCompileOptions
// on drivers that don't have the extension at all as it would break WebGL 1 for
// some users.
sink << "#extension GL_ARB_gpu_shader5 : enable\n";
sink << "#extension GL_EXT_gpu_shader5 : enable\n";
}
TExtensionGLSL extensionGLSL(getOutputType());
......
......@@ -63,6 +63,15 @@ const char *kIgnoredErrors[] = {
"share_context to eglCreateContext. Results are undefined.",
};
#endif // defined(ANGLE_PLATFORM_ANDROID)
const char *kIgnoredWarnings[] = {
// We always request GL_ARB_gpu_shader5 and GL_EXT_gpu_shader5 when compiling shaders but some
// drivers warn when it is not present. This ends up spamming the console on every shader
// compile.
"extension `GL_ARB_gpu_shader5' unsupported in",
"extension `GL_EXT_gpu_shader5' unsupported in",
};
} // namespace
static void INTERNAL_GL_APIENTRY LogGLDebugMessage(GLenum source,
......@@ -106,6 +115,14 @@ static void INTERNAL_GL_APIENTRY LogGLDebugMessage(GLenum source,
// Don't print performance warnings. They tend to be very spammy in the dEQP test suite and
// there is very little we can do about them.
for (const char *&warn : kIgnoredWarnings)
{
if (strstr(message, warn) != nullptr)
{
return;
}
}
// TODO(ynovikov): filter into WARN and INFO if INFO is ever implemented
WARN() << std::endl
<< "\tSource: " << sourceText << std::endl
......
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