gsdx-debug: only enabled advance gl debugging on linux

It will avoid some crash on windows for driver that doesn't support
the extension.

Make debug support mandatory for debug build on linux.
This commit is contained in:
Gregory Hainaut 2015-05-08 09:48:09 +02:00
parent e87d129b09
commit 6d31124d3a
2 changed files with 9 additions and 4 deletions

View File

@ -107,9 +107,14 @@ void GSWndGL::PopulateGlFunction()
// GL4.3
*(void**)&(gl_CopyImageSubData) = GetProcAddress("glCopyImageSubData", true);
*(void**)&(gl_InvalidateTexImage) = GetProcAddress("glInvalidateTexImage", true);
*(void**)&(gl_PushDebugGroup) = GetProcAddress("glPushDebugGroup", true);
*(void**)&(gl_PopDebugGroup) = GetProcAddress("glPopDebugGroup", true);
*(void**)&(gl_DebugMessageInsert) = GetProcAddress("glDebugMessageInsert", true);
#if defined(__linux__) && defined(ENABLE_OGL_DEBUG)
bool debug_optional = false;
#else
bool debug_optional = true;
#endif
*(void**)&(gl_PushDebugGroup) = GetProcAddress("glPushDebugGroup", debug_optional);
*(void**)&(gl_PopDebugGroup) = GetProcAddress("glPopDebugGroup", debug_optional);
*(void**)&(gl_DebugMessageInsert) = GetProcAddress("glDebugMessageInsert", debug_optional);
// GL4.4
*(void**)&(gl_BufferStorage) = GetProcAddress("glBufferStorage", true);
// GL_ARB_bindless_texture (GL5?)

View File

@ -494,7 +494,7 @@ extern void vmfree(void* ptr, size_t size);
#endif
// Except apple any sane driver support this extension
#ifdef ENABLE_OGL_DEBUG
#if defined(__linux__) && defined(ENABLE_OGL_DEBUG)
#define GL_PUSH(s) gl_PushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, s);
#define GL_POP(s) gl_PopDebugGroup();
#define GL_INS(s) gl_DebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0xDEAD, GL_DEBUG_SEVERITY_MEDIUM, -1, s);