summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3d_context.c
diff options
context:
space:
mode:
authorRhys Kidd <[email protected]>2018-08-10 12:40:10 -0400
committerEric Anholt <[email protected]>2018-12-20 11:31:16 -0800
commitd3991d247222122bdfba730cf76628374ac95668 (patch)
treee5fcf086fc26ca2fcb65ae0774d3a587be287403 /src/gallium/drivers/v3d/v3d_context.c
parentd80761b8f36245ed3529709b40a8f5d3721f0806 (diff)
v3d: Wire up core pipe_debug_callback
This lets the driver use pipe_debug_message() for GL_ARB_debug_output. Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_context.c')
-rw-r--r--src/gallium/drivers/v3d/v3d_context.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c
index 36c8f497824..1b148ecda2a 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)
{
struct v3d_context *v3d = v3d_context(pctx);
@@ -139,6 +151,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) {