gsdx-debug: support correct logging on mesa

By default low severity message were disabled. (thanks to be open source)
This commit is contained in:
Gregory Hainaut 2015-10-24 14:05:00 +02:00
parent c26f2cc80a
commit 9ba949c2d9
4 changed files with 14 additions and 5 deletions

View File

@ -107,6 +107,7 @@ PFNGLINVALIDATETEXIMAGEPROC glInvalidateTexImage = NUL
PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup = NULL; PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup = NULL;
PFNGLPOPDEBUGGROUPPROC glPopDebugGroup = NULL; PFNGLPOPDEBUGGROUPPROC glPopDebugGroup = NULL;
PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert = NULL; PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert = NULL;
PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl = NULL;
// GL4.2 // GL4.2
PFNGLBINDIMAGETEXTUREPROC glBindImageTexture = NULL; PFNGLBINDIMAGETEXTUREPROC glBindImageTexture = NULL;
PFNGLMEMORYBARRIERPROC glMemoryBarrier = NULL; PFNGLMEMORYBARRIERPROC glMemoryBarrier = NULL;

View File

@ -275,6 +275,7 @@ extern PFNGLCOPYIMAGESUBDATAPROC glCopyImageSubData;
extern PFNGLINVALIDATETEXIMAGEPROC glInvalidateTexImage; extern PFNGLINVALIDATETEXIMAGEPROC glInvalidateTexImage;
extern PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup; extern PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup;
extern PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert; extern PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert;
extern PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl;
// GL4.4 // GL4.4
extern PFNGLCLEARTEXIMAGEPROC glClearTexImage; extern PFNGLCLEARTEXIMAGEPROC glClearTexImage;
extern PFNGLBUFFERSTORAGEPROC glBufferStorage; extern PFNGLBUFFERSTORAGEPROC glBufferStorage;

View File

@ -191,20 +191,26 @@ bool GSDeviceOGL::Create(GSWnd* wnd)
if (!GLLoader::check_gl_supported_extension()) return false; if (!GLLoader::check_gl_supported_extension()) return false;
} }
GL_PUSH("GSDeviceOGL::Create");
m_window = wnd; m_window = wnd;
// **************************************************************** // ****************************************************************
// Debug helper // Debug helper
// **************************************************************** // ****************************************************************
#ifdef ENABLE_OGL_DEBUG #ifdef ENABLE_OGL_DEBUG
if (theApp.GetConfig("debug_opengl", 0) && glDebugMessageCallback) { if (theApp.GetConfig("debug_opengl", 0)) {
glDebugMessageCallback((GLDEBUGPROC)DebugOutputToFile, NULL); if (glDebugMessageCallback) {
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB); glDebugMessageCallback((GLDEBUGPROC)DebugOutputToFile, NULL);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
}
if (glDebugMessageControl) {
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, true);
}
} }
#endif #endif
// WARNING it must be done after the control setup (at least on MESA)
GL_PUSH("GSDeviceOGL::Create");
// **************************************************************** // ****************************************************************
// Various object // Various object
// **************************************************************** // ****************************************************************

View File

@ -114,6 +114,7 @@ void GSWndGL::PopulateGlFunction()
*(void**)&(glPushDebugGroup) = GetProcAddress("glPushDebugGroup", true); *(void**)&(glPushDebugGroup) = GetProcAddress("glPushDebugGroup", true);
*(void**)&(glPopDebugGroup) = GetProcAddress("glPopDebugGroup", true); *(void**)&(glPopDebugGroup) = GetProcAddress("glPopDebugGroup", true);
*(void**)&(glDebugMessageInsert) = GetProcAddress("glDebugMessageInsert", true); *(void**)&(glDebugMessageInsert) = GetProcAddress("glDebugMessageInsert", true);
*(void**)&(glDebugMessageControl) = GetProcAddress("glDebugMessageControl", true);
// GL4.4 // GL4.4
*(void**)&(glClearTexImage) = GetProcAddress("glClearTexImage", true); *(void**)&(glClearTexImage) = GetProcAddress("glClearTexImage", true);
*(void**)&(glBufferStorage) = GetProcAddress("glBufferStorage", true); *(void**)&(glBufferStorage) = GetProcAddress("glBufferStorage", true);