From 3d467c466a568bfbfda7911647833b99d6808920 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 19 Apr 2023 09:00:39 -0400 Subject: [PATCH] zink: hook up debug callback Reviewed-by: Emma Anholt Part-of: --- src/gallium/drivers/zink/zink_context.c | 11 +++++++++++ src/gallium/drivers/zink/zink_types.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 3af5eeb..df65906 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -284,6 +284,17 @@ zink_set_context_param(struct pipe_context *pctx, enum pipe_context_param param, } } +static void +zink_set_debug_callback(struct pipe_context *pctx, const struct util_debug_callback *cb) +{ + struct zink_context *ctx = zink_context(pctx); + + if (cb) + ctx->dbg = *cb; + else + memset(&ctx->dbg, 0, sizeof(ctx->dbg)); +} + static VkSamplerMipmapMode sampler_mipmap_mode(enum pipe_tex_mipfilter filter) { diff --git a/src/gallium/drivers/zink/zink_types.h b/src/gallium/drivers/zink/zink_types.h index 841707c..2b64c22 100644 --- a/src/gallium/drivers/zink/zink_types.h +++ b/src/gallium/drivers/zink/zink_types.h @@ -1666,6 +1666,7 @@ struct zink_context { struct slab_child_pool transfer_pool; struct slab_child_pool transfer_pool_unsync; struct blitter_context *blitter; + struct util_debug_callback dbg; unsigned flags; -- 2.7.4