gallium/u_threaded: Add call logging

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10753>
This commit is contained in:
Rob Clark 2021-05-11 08:44:42 -07:00 committed by Marge Bot
parent 3b69cbe06c
commit 57c8164389
2 changed files with 17 additions and 1 deletions

View file

@ -59,6 +59,14 @@ enum tc_call_id {
TC_NUM_CALLS,
};
#if TC_DEBUG >= 3
static const char *tc_call_names[] = {
#define CALL(name) #name,
#include "u_threaded_context_calls.h"
#undef CALL
};
#endif
struct tc_draw_single {
struct tc_call_base base;
unsigned index_bias;
@ -280,6 +288,10 @@ tc_batch_execute(void *job, UNUSED int thread_index)
}
}
#if TC_DEBUG >= 3
tc_printf("CALL: %s", tc_call_names[call->call_id]);
#endif
execute_func[call->call_id](pipe, call);
iter += call->num_slots;
}
@ -340,6 +352,10 @@ tc_add_sized_call(struct threaded_context *tc, enum tc_call_id id,
call->call_id = id;
call->num_slots = num_slots;
#if TC_DEBUG >= 3
tc_printf("ENQUEUE: %s", tc_call_names[id]);
#endif
tc_debug_check(tc);
return call;
}

View file

@ -182,7 +182,7 @@
struct threaded_context;
struct tc_unflushed_batch_token;
/* 0 = disabled, 1 = assertions, 2 = printfs */
/* 0 = disabled, 1 = assertions, 2 = printfs, 3 = logging */
#define TC_DEBUG 0
/* These are map flags sent to drivers. */