Commit 53432d3e authored by Olivier Fourdan's avatar Olivier Fourdan 🛠
Browse files

glamor: Only log a backtrace above a debug level



GLAMOR now logs an xorg_backtrace whenever a GL error is raised, to help
with debugging issues and identify the root cause of the GL error in the
code.

Yet that's meant for debugging, not necessarily something worth enabling
all the time.

Add a new debug level for glamor and log the backtraces only when the
debug level is set above that value, e.g. GLAMOR_DEBUG=4
Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
See-also: xorg/xserver#1288
Fixes: 3b265c59 - glamor: Dump backtrace on GL error
parent 288ec0e0
Pipeline #485720 passed with stages
in 4 minutes and 44 seconds
......@@ -414,7 +414,8 @@ glamor_debug_output_callback(GLenum source,
LogMessageVerb(X_ERROR, 0, "glamor%d: GL error: %*s\n",
screen->myNum, length, message);
xorg_backtrace();
if (glamor_debug_level >= GLAMOR_DEBUG_GENERATE_BACKTRACE)
xorg_backtrace();
}
/**
......
......@@ -34,6 +34,7 @@
#define GLAMOR_DEBUG_FALLBACK 1
#define GLAMOR_DEBUG_TEXTURE_DOWNLOAD 2
#define GLAMOR_DEBUG_TEXTURE_DYNAMIC_UPLOAD 3
#define GLAMOR_DEBUG_GENERATE_BACKTRACE 4
extern void
AbortServer(void)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment