Apparently there's some poor branch prediction behavior with various gcc versions. Apply tweak from v3 in assert_glerror().

This commit is contained in:
Shyotl
2015-07-23 01:39:50 -05:00
parent 0b6e69de7e
commit 09f3376259

View File

@@ -1465,19 +1465,29 @@ void do_assert_glerror()
void assert_glerror()
{
if (gNoRender)
if(!gNoRender)
{}
else
{
return;
}
if (!gGLActive)
{
//LL_WARNS() << "GL used while not active!" << LL_ENDL;
if (gDebugSession)
if (!gDebugSession)
{}
else
{
//ll_fail("GL used while not active");
}
}
if (gDebugGL)
if (!gDebugGL)
{
//funny looking if for branch prediction -- gDebugGL is almost always false and assert_glerror is called often
}
else
{
do_assert_glerror();
}