Enable the glStringMarker logger when available
glStringMarker is usually only available when running under some kind of GL debugger, and can be used to insert strings into the GL command string. Writing logs using it can be useful, since it lets us correspond GL calls with what happens in compton. More info about the extension can be found here: https://www.khronos.org/registry/OpenGL/extensions/GREMEDY/GREMEDY_string_marker.txt Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -2953,6 +2953,14 @@ session_init(session_t *ps_old, int argc, char **argv) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (bkend_use_glx(ps)) {
|
||||
auto glx_logger = glx_string_marker_logger_new();
|
||||
if (glx_logger) {
|
||||
log_info("Enabling gl string marker");
|
||||
log_add_target_tls(glx_logger);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize software optimization
|
||||
if (ps->o.sw_opti)
|
||||
ps->o.sw_opti = swopti_init(ps);
|
||||
|
Reference in New Issue
Block a user