zink: hook up debug callback

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22196>
This commit is contained in:
Mike Blumenkrantz 2023-04-19 09:00:39 -04:00 committed by Marge Bot
parent 366b79fa10
commit 3d467c466a
2 changed files with 12 additions and 0 deletions

View file

@ -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)
{

View file

@ -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;