summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/etnaviv/etnaviv_context.c
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2017-01-03 15:06:24 +0100
committerChristian Gmeiner <christian.gmeiner@gmail.com>2017-02-11 21:22:42 +0100
commit5a3ea68895f7815ccb5b3adeab07c992683c2d59 (patch)
tree6018998960777b13e3f020cc75f5c0685ad874fb /src/gallium/drivers/etnaviv/etnaviv_context.c
parent5bc222ebafddd14f2329f5096287b51d798a6431 (diff)
etnaviv: wire up core pipe_debug_callback
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_context.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_context.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c
index d767cd1f38..ce2d8719e4 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_context.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_context.c
@@ -246,6 +246,18 @@ etna_cmd_stream_reset_notify(struct etna_cmd_stream *stream, void *priv)
assert(LIST_IS_EMPTY(&ctx->used_resources));
}
+static void
+etna_set_debug_callback(struct pipe_context *pctx,
+ const struct pipe_debug_callback *cb)
+{
+ struct etna_context *ctx = etna_context(pctx);
+
+ if (cb)
+ ctx->debug = *cb;
+ else
+ memset(&ctx->debug, 0, sizeof(ctx->debug));
+}
+
struct pipe_context *
etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
{
@@ -279,6 +291,7 @@ etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
pctx->destroy = etna_context_destroy;
pctx->draw_vbo = etna_draw_vbo;
pctx->flush = etna_flush;
+ pctx->set_debug_callback = etna_set_debug_callback;
/* creation of compile states */
pctx->create_blend_state = etna_blend_state_create;