freedreno: Slight perf_debug rework
Allow ctx to be NULL in perf_debug_ctx() and make perf_debug() a shortcut for perf_debug_ctx(NULL, ...) to simplify things slightly in the next patch. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264>
This commit is contained in:
@@ -104,15 +104,15 @@ extern bool fd_binning_enabled;
|
||||
__FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0)
|
||||
|
||||
#define perf_debug_ctx(ctx, ...) do { \
|
||||
perf_debug(__VA_ARGS__); \
|
||||
pipe_debug_message(&(ctx)->debug, PERF_INFO, __VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define perf_debug(...) do { \
|
||||
if (FD_DBG(PERF)) \
|
||||
mesa_logw(__VA_ARGS__); \
|
||||
struct fd_context *__c = (ctx); \
|
||||
if (__c) \
|
||||
pipe_debug_message(&__c->debug, PERF_INFO, __VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define perf_debug(...) perf_debug_ctx(NULL, __VA_ARGS__)
|
||||
|
||||
struct fd_context;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user