Lines Matching refs:debug
395 struct gl_debug_state *debug; in debug_create() local
398 debug = CALLOC_STRUCT(gl_debug_state); in debug_create()
399 if (!debug) in debug_create()
402 debug->Groups[0] = malloc(sizeof(*debug->Groups[0])); in debug_create()
403 if (!debug->Groups[0]) { in debug_create()
404 free(debug); in debug_create()
411 debug_namespace_init(&debug->Groups[0]->Namespaces[s][t]); in debug_create()
414 return debug; in debug_create()
421 debug_is_group_read_only(const struct gl_debug_state *debug) in debug_is_group_read_only() argument
423 const GLint gstack = debug->CurrentGroup; in debug_is_group_read_only()
424 return (gstack > 0 && debug->Groups[gstack] == debug->Groups[gstack - 1]); in debug_is_group_read_only()
431 debug_make_group_writable(struct gl_debug_state *debug) in debug_make_group_writable() argument
433 const GLint gstack = debug->CurrentGroup; in debug_make_group_writable()
434 const struct gl_debug_group *src = debug->Groups[gstack]; in debug_make_group_writable()
438 if (!debug_is_group_read_only(debug)) in debug_make_group_writable()
462 debug->Groups[gstack] = dst; in debug_make_group_writable()
471 debug_clear_group(struct gl_debug_state *debug) in debug_clear_group() argument
473 const GLint gstack = debug->CurrentGroup; in debug_clear_group()
475 if (!debug_is_group_read_only(debug)) { in debug_clear_group()
476 struct gl_debug_group *grp = debug->Groups[gstack]; in debug_clear_group()
487 debug->Groups[gstack] = NULL; in debug_clear_group()
494 debug_delete_messages(struct gl_debug_state *debug, int count) in debug_delete_messages() argument
496 struct gl_debug_log *log = &debug->Log; in debug_delete_messages()
517 debug_destroy(struct gl_debug_state *debug) in debug_destroy() argument
519 while (debug->CurrentGroup > 0) { in debug_destroy()
520 debug_clear_group(debug); in debug_destroy()
521 debug->CurrentGroup--; in debug_destroy()
524 debug_clear_group(debug); in debug_destroy()
525 debug_delete_messages(debug, debug->Log.NumMessages); in debug_destroy()
526 free(debug); in debug_destroy()
533 debug_set_message_enable(struct gl_debug_state *debug, in debug_set_message_enable() argument
538 const GLint gstack = debug->CurrentGroup; in debug_set_message_enable()
541 debug_make_group_writable(debug); in debug_set_message_enable()
542 ns = &debug->Groups[gstack]->Namespaces[source][type]; in debug_set_message_enable()
559 debug_set_message_enable_all(struct gl_debug_state *debug, in debug_set_message_enable_all() argument
565 const GLint gstack = debug->CurrentGroup; in debug_set_message_enable_all()
582 debug_make_group_writable(debug); in debug_set_message_enable_all()
587 &debug->Groups[gstack]->Namespaces[s][t]; in debug_set_message_enable_all()
597 _mesa_debug_is_message_enabled(const struct gl_debug_state *debug, in _mesa_debug_is_message_enabled() argument
603 const GLint gstack = debug->CurrentGroup; in _mesa_debug_is_message_enabled()
604 struct gl_debug_group *grp = debug->Groups[gstack]; in _mesa_debug_is_message_enabled()
607 if (!debug->DebugOutput) in _mesa_debug_is_message_enabled()
620 debug_log_message(struct gl_debug_state *debug, in debug_log_message() argument
626 struct gl_debug_log *log = &debug->Log; in debug_log_message()
630 if (debug->LogToStderr) { in debug_log_message()
653 debug_fetch_message(const struct gl_debug_state *debug) in debug_fetch_message() argument
655 const struct gl_debug_log *log = &debug->Log; in debug_fetch_message()
661 debug_get_group_message(struct gl_debug_state *debug) in debug_get_group_message() argument
663 return &debug->GroupMessages[debug->CurrentGroup]; in debug_get_group_message()
667 debug_push_group(struct gl_debug_state *debug) in debug_push_group() argument
669 const GLint gstack = debug->CurrentGroup; in debug_push_group()
672 debug->Groups[gstack + 1] = debug->Groups[gstack]; in debug_push_group()
673 debug->CurrentGroup++; in debug_push_group()
677 debug_pop_group(struct gl_debug_state *debug) in debug_pop_group() argument
679 debug_clear_group(debug); in debug_pop_group()
680 debug->CurrentGroup--; in debug_pop_group()
804 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_set_debug_state_int() local
806 if (!debug) in _mesa_set_debug_state_int()
811 debug->DebugOutput = (val != 0); in _mesa_set_debug_state_int()
814 debug->SyncOutput = (val != 0); in _mesa_set_debug_state_int()
835 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_get_debug_state_int() local
836 if (!debug) in _mesa_get_debug_state_int()
841 val = debug->DebugOutput; in _mesa_get_debug_state_int()
844 val = debug->SyncOutput; in _mesa_get_debug_state_int()
847 val = debug->Log.NumMessages; in _mesa_get_debug_state_int()
850 val = (debug->Log.NumMessages) ? in _mesa_get_debug_state_int()
851 debug->Log.Messages[debug->Log.NextMessage].length + 1 : 0; in _mesa_get_debug_state_int()
854 val = debug->CurrentGroup + 1; in _mesa_get_debug_state_int()
875 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_get_debug_state_ptr() local
877 if (!debug) in _mesa_get_debug_state_ptr()
882 val = (void *) debug->Callback; in _mesa_get_debug_state_ptr()
885 val = (void *) debug->CallbackData; in _mesa_get_debug_state_ptr()
909 struct gl_debug_state *debug = ctx->Debug; in log_msg_locked_and_unlock() local
911 if (!_mesa_debug_is_message_enabled(debug, source, type, id, severity)) { in log_msg_locked_and_unlock()
947 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_log_msg() local
949 if (!debug) in _mesa_log_msg()
1104 struct gl_debug_state *debug; in _mesa_GetDebugMessageLog() local
1123 debug = _mesa_lock_debug_state(ctx); in _mesa_GetDebugMessageLog()
1124 if (!debug) in _mesa_GetDebugMessageLog()
1128 const struct gl_debug_message *msg = debug_fetch_message(debug); in _mesa_GetDebugMessageLog()
1160 debug_delete_messages(debug, 1); in _mesa_GetDebugMessageLog()
1179 struct gl_debug_state *debug; in _mesa_DebugMessageControl() local
1206 debug = _mesa_lock_debug_state(ctx); in _mesa_DebugMessageControl()
1207 if (!debug) in _mesa_DebugMessageControl()
1213 debug_set_message_enable(debug, source, type, ids[i], enabled); in _mesa_DebugMessageControl()
1216 debug_set_message_enable_all(debug, source, type, severity, enabled); in _mesa_DebugMessageControl()
1227 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_DebugMessageCallback() local
1228 if (debug) { in _mesa_DebugMessageCallback()
1229 debug->Callback = callback; in _mesa_DebugMessageCallback()
1230 debug->CallbackData = userParam; in _mesa_DebugMessageCallback()
1242 struct gl_debug_state *debug; in _mesa_PushDebugGroup() local
1266 debug = _mesa_lock_debug_state(ctx); in _mesa_PushDebugGroup()
1267 if (!debug) in _mesa_PushDebugGroup()
1270 if (debug->CurrentGroup >= MAX_DEBUG_GROUP_STACK_DEPTH-1) { in _mesa_PushDebugGroup()
1277 emptySlot = debug_get_group_message(debug); in _mesa_PushDebugGroup()
1285 debug_push_group(debug); in _mesa_PushDebugGroup()
1300 struct gl_debug_state *debug; in _mesa_PopDebugGroup() local
1308 debug = _mesa_lock_debug_state(ctx); in _mesa_PopDebugGroup()
1309 if (!debug) in _mesa_PopDebugGroup()
1312 if (debug->CurrentGroup <= 0) { in _mesa_PopDebugGroup()
1318 debug_pop_group(debug); in _mesa_PopDebugGroup()
1321 gdmessage = debug_get_group_message(debug); in _mesa_PopDebugGroup()
1347 struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); in _mesa_init_debug_output() local
1348 if (!debug) { in _mesa_init_debug_output()
1351 debug->DebugOutput = GL_TRUE; in _mesa_init_debug_output()
1352 debug->LogToStderr = GL_TRUE; in _mesa_init_debug_output()