Signed-off-by: Rhys Kidd <rhysk...@gmail.com> --- src/gallium/drivers/v3d/v3d_context.c | 13 +++++++++++++ src/gallium/drivers/v3d/v3d_context.h | 1 + 2 files changed, 14 insertions(+)
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index 2fd2fa0bbf..0737713e8b 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -66,6 +66,18 @@ v3d_pipe_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, } } +static void +v3d_set_debug_callback(struct pipe_context *pctx, + const struct pipe_debug_callback *cb) +{ + struct v3d_context *v3d = v3d_context(pctx); + + if (cb) + v3d->debug = *cb; + else + memset(&v3d->debug, 0, sizeof(v3d->debug)); +} + static void v3d_invalidate_resource(struct pipe_context *pctx, struct pipe_resource *prsc) { @@ -138,6 +150,7 @@ v3d_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) pctx->priv = priv; pctx->destroy = v3d_context_destroy; pctx->flush = v3d_pipe_flush; + pctx->set_debug_callback = v3d_set_debug_callback; pctx->invalidate_resource = v3d_invalidate_resource; if (screen->devinfo.ver >= 41) { diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index f6720e2ca9..536ef61d0c 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -425,6 +425,7 @@ struct v3d_context { struct v3d_vertexbuf_stateobj vertexbuf; struct v3d_streamout_stateobj streamout; struct v3d_bo *current_oq; + struct pipe_debug_callback debug; /** @} */ }; -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev