build/cogl: Simplify debug c-args
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806>
This commit is contained in:
parent
e79f460eb8
commit
2c996a1b16
3 changed files with 6 additions and 8 deletions
|
@ -42,7 +42,7 @@
|
||||||
#define GL_CONTEXT_LOST GL_CONTEXT_LOST_KHR
|
#define GL_CONTEXT_LOST GL_CONTEXT_LOST_KHR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef COGL_GL_DEBUG
|
#ifdef COGL_ENABLE_DEBUG
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
_cogl_gl_error_to_string (GLenum error_code);
|
_cogl_gl_error_to_string (GLenum error_code);
|
||||||
|
@ -69,12 +69,12 @@ _cogl_gl_error_to_string (GLenum error_code);
|
||||||
_cogl_gl_error_to_string (__err)); \
|
_cogl_gl_error_to_string (__err)); \
|
||||||
} } G_STMT_END
|
} } G_STMT_END
|
||||||
|
|
||||||
#else /* !COGL_GL_DEBUG */
|
#else /* !COGL_ENABLE_DEBUG */
|
||||||
|
|
||||||
#define GE(ctx, x) ((ctx)->x)
|
#define GE(ctx, x) ((ctx)->x)
|
||||||
#define GE_RET(ret, ctx, x) (ret = ((ctx)->x))
|
#define GE_RET(ret, ctx, x) (ret = ((ctx)->x))
|
||||||
|
|
||||||
#endif /* COGL_GL_DEBUG */
|
#endif /* COGL_ENABLE_DEBUG */
|
||||||
|
|
||||||
typedef struct _CoglGLContext {
|
typedef struct _CoglGLContext {
|
||||||
GArray *texture_units;
|
GArray *texture_units;
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
|
#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef COGL_GL_DEBUG
|
#ifdef COGL_ENABLE_DEBUG
|
||||||
/* GL error to string conversion */
|
/* GL error to string conversion */
|
||||||
static const struct {
|
static const struct {
|
||||||
GLuint error_code;
|
GLuint error_code;
|
||||||
|
@ -94,7 +94,7 @@ _cogl_gl_error_to_string (GLenum error_code)
|
||||||
|
|
||||||
return "Unknown GL error";
|
return "Unknown GL error";
|
||||||
}
|
}
|
||||||
#endif /* COGL_GL_DEBUG */
|
#endif /* COGL_ENABLE_DEBUG */
|
||||||
|
|
||||||
CoglGLContext *
|
CoglGLContext *
|
||||||
_cogl_driver_gl_context (CoglContext *context)
|
_cogl_driver_gl_context (CoglContext *context)
|
||||||
|
@ -301,7 +301,7 @@ _cogl_gl_util_catch_out_of_memory (CoglContext *ctx, GError **error)
|
||||||
{
|
{
|
||||||
if (gl_error == GL_OUT_OF_MEMORY)
|
if (gl_error == GL_OUT_OF_MEMORY)
|
||||||
out_of_memory = TRUE;
|
out_of_memory = TRUE;
|
||||||
#ifdef COGL_GL_DEBUG
|
#ifdef COGL_ENABLE_DEBUG
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("%s: GL error (%d): %s\n",
|
g_warning ("%s: GL error (%d): %s\n",
|
||||||
|
|
|
@ -86,8 +86,6 @@ cogl_debug_c_args = []
|
||||||
if buildtype != 'plain'
|
if buildtype != 'plain'
|
||||||
if get_option('debug')
|
if get_option('debug')
|
||||||
cogl_debug_c_args += [
|
cogl_debug_c_args += [
|
||||||
'-DCOGL_GL_DEBUG',
|
|
||||||
'-DCOGL_OBJECT_DEBUG',
|
|
||||||
'-DCOGL_ENABLE_DEBUG',
|
'-DCOGL_ENABLE_DEBUG',
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue