mirror of https://github.com/PCSX2/pcsx2.git
gsdx ogl: check debug function exists
I'm sure they exists in the openGL renderer context but there are also used in common code. So potentially in DX context.
This commit is contained in:
parent
99476f4b13
commit
30ce6b0a6a
|
@ -424,10 +424,11 @@ extern void vmfree(void* ptr, size_t size);
|
|||
|
||||
#endif
|
||||
|
||||
#define GL_INSERT(type, code, sev, ...) \
|
||||
do glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, type, code, sev, -1, format(__VA_ARGS__).c_str()); while(0);
|
||||
// Note: GL messages are present in common code, so in all renderers.
|
||||
|
||||
#define GL_INSERT(type, code, sev, ...) \
|
||||
do if (glDebugMessageInsert) glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, type, code, sev, -1, format(__VA_ARGS__).c_str()); while(0);
|
||||
|
||||
// Except apple any sane driver support this extension
|
||||
#if defined(_DEBUG)
|
||||
#define GL_CACHE(...) GL_INSERT(GL_DEBUG_TYPE_OTHER, 0xFEAD, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__)
|
||||
#else
|
||||
|
@ -441,9 +442,9 @@ struct GLAutoPop {
|
|||
}
|
||||
};
|
||||
|
||||
#define GL_PUSH_(...) do glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str()); while(0);
|
||||
#define GL_PUSH(...) do glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str()); while(0); GLAutoPop gl_auto_pop;
|
||||
#define GL_POP() do glPopDebugGroup(); while(0);
|
||||
#define GL_PUSH_(...) do if (glPushDebugGroup) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str()); while(0);
|
||||
#define GL_PUSH(...) do if (glPushDebugGroup) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str()); while(0); GLAutoPop gl_auto_pop;
|
||||
#define GL_POP() do if (glPopDebugGroup) glPopDebugGroup(); while(0);
|
||||
#define GL_INS(...) GL_INSERT(GL_DEBUG_TYPE_ERROR, 0xDEAD, GL_DEBUG_SEVERITY_MEDIUM, __VA_ARGS__)
|
||||
#define GL_PERF(...) GL_INSERT(GL_DEBUG_TYPE_PERFORMANCE, 0xFEE1, GL_DEBUG_SEVERITY_NOTIFICATION, __VA_ARGS__)
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue