Merge pull request #1584 from degasus/master

OGL: also show driver warnings on release builds
This commit is contained in:
Lioncash 2014-11-25 12:41:47 -05:00
commit 4afb85ef33
2 changed files with 12 additions and 9 deletions

View File

@ -161,7 +161,6 @@ static void ApplySSAASettings()
} }
} }
#if defined(_DEBUG) || defined(DEBUGFAST)
static void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char* message, const void* userParam) static void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char* message, const void* userParam)
{ {
const char *s_source; const char *s_source;
@ -195,7 +194,6 @@ static void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id, GLe
default: ERROR_LOG(VIDEO, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message); break; default: ERROR_LOG(VIDEO, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message); break;
} }
} }
#endif
// Two small Fallbacks to avoid GL_ARB_ES2_compatibility // Two small Fallbacks to avoid GL_ARB_ES2_compatibility
static void GLAPIENTRY DepthRangef(GLfloat neardepth, GLfloat fardepth) static void GLAPIENTRY DepthRangef(GLfloat neardepth, GLfloat fardepth)
@ -520,7 +518,7 @@ Renderer::Renderer()
g_ogl_config.eSupportedGLSLVersion = GLSL_150; g_ogl_config.eSupportedGLSLVersion = GLSL_150;
} }
} }
#if defined(_DEBUG) || defined(DEBUGFAST)
if (GLExtensions::Supports("GL_KHR_debug")) if (GLExtensions::Supports("GL_KHR_debug"))
{ {
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, true); glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, true);
@ -533,7 +531,7 @@ Renderer::Renderer()
glDebugMessageCallbackARB( ErrorCallback, nullptr ); glDebugMessageCallbackARB( ErrorCallback, nullptr );
glEnable( GL_DEBUG_OUTPUT ); glEnable( GL_DEBUG_OUTPUT );
} }
#endif
int samples; int samples;
glGetIntegerv(GL_SAMPLES, &samples); glGetIntegerv(GL_SAMPLES, &samples);
if (samples > 1) if (samples > 1)

View File

@ -376,14 +376,19 @@ static void BPWritten(const BPCmd& bp)
if (!g_bSkipCurrentFrame) if (!g_bSkipCurrentFrame)
{ {
u8 offset = bp.address & 2; u8 offset = bp.address & 2;
BoundingBox::coords[offset] = bp.newvalue & 0x3ff;
BoundingBox::coords[offset + 1] = bp.newvalue >> 10;
BoundingBox::active = true; BoundingBox::active = true;
if (g_ActiveConfig.backend_info.bSupportsBBox)
{
g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff); g_renderer->BBoxWrite(offset, bp.newvalue & 0x3ff);
g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10); g_renderer->BBoxWrite(offset + 1, bp.newvalue >> 10);
} }
else
{
BoundingBox::coords[offset] = bp.newvalue & 0x3ff;
BoundingBox::coords[offset + 1] = bp.newvalue >> 10;
}
}
return; return;
case BPMEM_TEXINVALIDATE: case BPMEM_TEXINVALIDATE:
// TODO: Needs some restructuring in TextureCacheBase. // TODO: Needs some restructuring in TextureCacheBase.