##__VA_ARGS__); \
} while (0)
-#define perf_debug_ctx(ctx, ...) \
+#define perf_debug_message(debug, type, ...) \
do { \
if (FD_DBG(PERF)) \
mesa_logw(__VA_ARGS__); \
+ struct pipe_debug_callback *__d = (debug); \
+ if (__d) \
+ pipe_debug_message(__d, type, __VA_ARGS__); \
+ } while (0)
+
+#define perf_debug_ctx(ctx, ...) \
+ do { \
struct fd_context *__c = (ctx); \
- if (__c) \
- pipe_debug_message(&__c->debug, PERF_INFO, __VA_ARGS__); \
+ perf_debug_message(__c ? &__c->debug : NULL, PERF_INFO, __VA_ARGS__); \
} while (0)
#define perf_debug(...) perf_debug_ctx(NULL, __VA_ARGS__)
if (created) {
if (shader->initial_variants_done) {
- pipe_debug_message(debug, SHADER_INFO,
+ perf_debug_message(debug, SHADER_INFO,
"%s shader: recompiling at draw time: global "
"0x%08x, vfsamples %x/%x, astc %x/%x\n",
ir3_shader_stage(v), key.global, key.vsamples,