Commit 3e520b6f by Geoff Lang Committed by Commit Bot

OpenGL: Disable forwarding debug groups and messages all the way to the driver.

Because of virtualized contexts, the debug groups are not always popped in the same order that they are pushed leading to inconsistant state and sometimes GL_STACK_OVERFLOW errors from the driver. BUG=angleproject:2354 Change-Id: I0a001002149184dd882c3b17e8451bcd694608ba Reviewed-on: https://chromium-review.googlesource.com/909794Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent ed04619a
...@@ -548,69 +548,22 @@ ContextImpl *RendererGL::createContext(const gl::ContextState &state) ...@@ -548,69 +548,22 @@ ContextImpl *RendererGL::createContext(const gl::ContextState &state)
void RendererGL::insertEventMarker(GLsizei length, const char *marker) void RendererGL::insertEventMarker(GLsizei length, const char *marker)
{ {
if (mFunctions->insertEventMarkerEXT)
{
mFunctions->insertEventMarkerEXT(length, marker);
}
else if (mFunctions->debugMessageInsert)
{
mFunctions->debugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_MARKER, 0,
GL_DEBUG_SEVERITY_NOTIFICATION, length, marker);
}
else
{
UNREACHABLE();
}
} }
void RendererGL::pushGroupMarker(GLsizei length, const char *marker) void RendererGL::pushGroupMarker(GLsizei length, const char *marker)
{ {
if (mFunctions->pushGroupMarkerEXT)
{
mFunctions->pushGroupMarkerEXT(length, marker);
}
else if (mFunctions->pushDebugGroup)
{
// Fall back to KHR_debug to implement EXT_debug_marker
mFunctions->pushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, length, marker);
}
else
{
UNREACHABLE();
}
} }
void RendererGL::popGroupMarker() void RendererGL::popGroupMarker()
{ {
if (mFunctions->popGroupMarkerEXT)
{
mFunctions->popGroupMarkerEXT();
}
else if (mFunctions->popDebugGroup)
{
// Fall back to KHR_debug to implement EXT_debug_marker
mFunctions->popDebugGroup();
}
else
{
UNREACHABLE();
}
} }
void RendererGL::pushDebugGroup(GLenum source, GLuint id, GLsizei length, const char *message) void RendererGL::pushDebugGroup(GLenum source, GLuint id, GLsizei length, const char *message)
{ {
if (mFunctions->pushDebugGroup)
{
mFunctions->pushDebugGroup(source, id, length, message);
}
} }
void RendererGL::popDebugGroup() void RendererGL::popDebugGroup()
{ {
if (mFunctions->popDebugGroup)
{
mFunctions->popDebugGroup();
}
} }
std::string RendererGL::getVendorString() const std::string RendererGL::getVendorString() const
......
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