diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index 2871cebac8c..c56d6ee41f4 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -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; /**