Apparently there's some poor branch prediction behavior with various gcc versions. Apply tweak from v3 in assert_glerror().
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user