1
0
Fork 0

build/cogl: Simplify debug c-args

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806>
This commit is contained in:
Bilal Elmoussaoui 2024-06-12 13:27:33 +02:00
parent e79f460eb8
commit 2c996a1b16
3 changed files with 6 additions and 8 deletions

View file

@ -42,7 +42,7 @@
#define GL_CONTEXT_LOST GL_CONTEXT_LOST_KHR
#endif
#ifdef COGL_GL_DEBUG
#ifdef COGL_ENABLE_DEBUG
const char *
_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)); \
} } G_STMT_END
#else /* !COGL_GL_DEBUG */
#else /* !COGL_ENABLE_DEBUG */
#define GE(ctx, x) ((ctx)->x)
#define GE_RET(ret, ctx, x) (ret = ((ctx)->x))
#endif /* COGL_GL_DEBUG */
#endif /* COGL_ENABLE_DEBUG */
typedef struct _CoglGLContext {
GArray *texture_units;

View file

@ -58,7 +58,7 @@
#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
#endif
#ifdef COGL_GL_DEBUG
#ifdef COGL_ENABLE_DEBUG
/* GL error to string conversion */
static const struct {
GLuint error_code;
@ -94,7 +94,7 @@ _cogl_gl_error_to_string (GLenum error_code)
return "Unknown GL error";
}
#endif /* COGL_GL_DEBUG */
#endif /* COGL_ENABLE_DEBUG */
CoglGLContext *
_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)
out_of_memory = TRUE;
#ifdef COGL_GL_DEBUG
#ifdef COGL_ENABLE_DEBUG
else
{
g_warning ("%s: GL error (%d): %s\n",

View file

@ -86,8 +86,6 @@ cogl_debug_c_args = []
if buildtype != 'plain'
if get_option('debug')
cogl_debug_c_args += [
'-DCOGL_GL_DEBUG',
'-DCOGL_OBJECT_DEBUG',
'-DCOGL_ENABLE_DEBUG',
]
else