Lines Matching refs:debug
409 struct gl_debug_state *debug; in debug_create() local
412 debug = CALLOC_STRUCT(gl_debug_state); in debug_create()
413 if (!debug) in debug_create()
416 debug->Groups[0] = malloc(sizeof(*debug->Groups[0])); in debug_create()
417 if (!debug->Groups[0]) { in debug_create()
418 free(debug); in debug_create()
425 debug_namespace_init(&debug->Groups[0]->Namespaces[s][t]); in debug_create()
428 return debug; in debug_create()
435 debug_is_group_read_only(const struct gl_debug_state *debug) in debug_is_group_read_only() argument
437 const GLint gstack = debug->CurrentGroup; in debug_is_group_read_only()
438 return (gstack > 0 && debug->Groups[gstack] == debug->Groups[gstack - 1]); in debug_is_group_read_only()
445 debug_make_group_writable(struct gl_debug_state *debug) in debug_make_group_writable() argument
447 const GLint gstack = debug->CurrentGroup; in debug_make_group_writable()
448 const struct gl_debug_group *src = debug->Groups[gstack]; in debug_make_group_writable()
452 if (!debug_is_group_read_only(debug)) in debug_make_group_writable()
476 debug->Groups[gstack] = dst; in debug_make_group_writable()
485 debug_clear_group(struct gl_debug_state *debug) in debug_clear_group() argument
487 const GLint gstack = debug->CurrentGroup; in debug_clear_group()
489 if (!debug_is_group_read_only(debug)) { in debug_clear_group()
490 struct gl_debug_group *grp = debug->Groups[gstack]; in debug_clear_group()
501 debug->Groups[gstack] = NULL; in debug_clear_group()
509 debug_destroy(struct gl_debug_state *debug) in debug_destroy() argument
511 while (debug->CurrentGroup > 0) { in debug_destroy()
512 debug_clear_group(debug); in debug_destroy()
513 debug->CurrentGroup--; in debug_destroy()
516 debug_clear_group(debug); in debug_destroy()
517 free(debug); in debug_destroy()
524 debug_set_message_enable(struct gl_debug_state *debug, in debug_set_message_enable() argument
529 const GLint gstack = debug->CurrentGroup; in debug_set_message_enable()
532 debug_make_group_writable(debug); in debug_set_message_enable()
533 ns = &debug->Groups[gstack]->Namespaces[source][type]; in debug_set_message_enable()
550 debug_set_message_enable_all(struct gl_debug_state *debug, in debug_set_message_enable_all() argument
556 const GLint gstack = debug->CurrentGroup; in debug_set_message_enable_all()
573 debug_make_group_writable(debug); in debug_set_message_enable_all()
578 &debug->Groups[gstack]->Namespaces[s][t]; in debug_set_message_enable_all()
588 _mesa_debug_is_message_enabled(const struct gl_debug_state *debug, in _mesa_debug_is_message_enabled() argument
594 const GLint gstack = debug->CurrentGroup; in _mesa_debug_is_message_enabled()
595 struct gl_debug_group *grp = debug->Groups[gstack]; in _mesa_debug_is_message_enabled()
598 if (!debug->DebugOutput) in _mesa_debug_is_message_enabled()
611 debug_log_message(struct gl_debug_state *debug, in debug_log_message() argument
617 struct gl_debug_log *log = &debug->Log; in debug_log_message()
621 if (debug->LogToStderr) { in debug_log_message()
644 debug_fetch_message(const struct gl_debug_state *debug) in debug_fetch_message() argument
646 const struct gl_debug_log *log = &debug->Log; in debug_fetch_message()
655 debug_delete_messages(struct gl_debug_state *debug, int count) in debug_delete_messages() argument
657 struct gl_debug_log *log = &debug->Log; in debug_delete_messages()
674 debug_get_group_message(struct gl_debug_state *debug) in debug_get_group_message() argument
676 return &debug->GroupMessages[debug->CurrentGroup]; in debug_get_group_message()
680 debug_push_group(struct gl_debug_state *debug) in debug_push_group() argument
682 const GLint gstack = debug->CurrentGroup; in debug_push_group()
685 debug->Groups[gstack + 1] = debug->Groups[gstack]; in debug_push_group()
686 debug->CurrentGroup++; in debug_push_group()
690 debug_pop_group(struct gl_debug_state *debug) in debug_pop_group() argument
692 debug_clear_group(debug); in debug_pop_group()
693 debug->CurrentGroup--; in debug_pop_group()
740 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_set_debug_state_int() local
742 if (!debug) in _mesa_set_debug_state_int()
747 debug->DebugOutput = (val != 0); in _mesa_set_debug_state_int()
750 debug->SyncOutput = (val != 0); in _mesa_set_debug_state_int()
771 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_get_debug_state_int() local
772 if (!debug) in _mesa_get_debug_state_int()
777 val = debug->DebugOutput; in _mesa_get_debug_state_int()
780 val = debug->SyncOutput; in _mesa_get_debug_state_int()
783 val = debug->Log.NumMessages; in _mesa_get_debug_state_int()
786 val = (debug->Log.NumMessages) ? in _mesa_get_debug_state_int()
787 debug->Log.Messages[debug->Log.NextMessage].length + 1 : 0; in _mesa_get_debug_state_int()
790 val = debug->CurrentGroup + 1; in _mesa_get_debug_state_int()
811 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_get_debug_state_ptr() local
813 if (!debug) in _mesa_get_debug_state_ptr()
818 val = (void *) debug->Callback; in _mesa_get_debug_state_ptr()
821 val = (void *) debug->CallbackData; in _mesa_get_debug_state_ptr()
845 struct gl_debug_state *debug = ctx->Debug; in log_msg_locked_and_unlock() local
847 if (!_mesa_debug_is_message_enabled(debug, source, type, id, severity)) { in log_msg_locked_and_unlock()
883 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_log_msg() local
885 if (!debug) in _mesa_log_msg()
1040 struct gl_debug_state *debug; in _mesa_GetDebugMessageLog() local
1059 debug = _mesa_lock_debug_state(ctx); in _mesa_GetDebugMessageLog()
1060 if (!debug) in _mesa_GetDebugMessageLog()
1064 const struct gl_debug_message *msg = debug_fetch_message(debug); in _mesa_GetDebugMessageLog()
1096 debug_delete_messages(debug, 1); in _mesa_GetDebugMessageLog()
1115 struct gl_debug_state *debug; in _mesa_DebugMessageControl() local
1142 debug = _mesa_lock_debug_state(ctx); in _mesa_DebugMessageControl()
1143 if (!debug) in _mesa_DebugMessageControl()
1149 debug_set_message_enable(debug, source, type, ids[i], enabled); in _mesa_DebugMessageControl()
1152 debug_set_message_enable_all(debug, source, type, severity, enabled); in _mesa_DebugMessageControl()
1163 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_DebugMessageCallback() local
1164 if (debug) { in _mesa_DebugMessageCallback()
1165 debug->Callback = callback; in _mesa_DebugMessageCallback()
1166 debug->CallbackData = userParam; in _mesa_DebugMessageCallback()
1178 struct gl_debug_state *debug; in _mesa_PushDebugGroup() local
1202 debug = _mesa_lock_debug_state(ctx); in _mesa_PushDebugGroup()
1203 if (!debug) in _mesa_PushDebugGroup()
1206 if (debug->CurrentGroup >= MAX_DEBUG_GROUP_STACK_DEPTH-1) { in _mesa_PushDebugGroup()
1213 emptySlot = debug_get_group_message(debug); in _mesa_PushDebugGroup()
1221 debug_push_group(debug); in _mesa_PushDebugGroup()
1236 struct gl_debug_state *debug; in _mesa_PopDebugGroup() local
1244 debug = _mesa_lock_debug_state(ctx); in _mesa_PopDebugGroup()
1245 if (!debug) in _mesa_PopDebugGroup()
1248 if (debug->CurrentGroup <= 0) { in _mesa_PopDebugGroup()
1254 debug_pop_group(debug); in _mesa_PopDebugGroup()
1257 gdmessage = debug_get_group_message(debug); in _mesa_PopDebugGroup()
1283 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_init_debug_output() local
1284 if (!debug) { in _mesa_init_debug_output()
1287 debug->DebugOutput = GL_TRUE; in _mesa_init_debug_output()
1288 debug->LogToStderr = GL_TRUE; in _mesa_init_debug_output()