Mesa (master): etnaviv: wire up core pipe_debug_callback
Christian Gmeiner
austriancoder at kemper.freedesktop.org
Sat Feb 11 20:23:14 UTC 2017
Module: Mesa
Branch: master
Commit: 5a3ea68895f7815ccb5b3adeab07c992683c2d59
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a3ea68895f7815ccb5b3adeab07c992683c2d59
Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date: Tue Jan 3 15:06:24 2017 +0100
etnaviv: wire up core pipe_debug_callback
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Lucas Stach <l.stach at pengutronix.de>
---
src/gallium/drivers/etnaviv/etnaviv_context.c | 13 +++++++++++++
src/gallium/drivers/etnaviv/etnaviv_context.h | 2 ++
2 files changed, 15 insertions(+)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c
index d767cd1..ce2d871 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;
diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.h b/src/gallium/drivers/etnaviv/etnaviv_context.h
index 74e93e1..a921403 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_context.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_context.h
@@ -174,6 +174,8 @@ struct etna_context {
uint64_t prims_emitted;
uint64_t draw_calls;
} stats;
+
+ struct pipe_debug_callback debug;
};
static inline struct etna_context *
More information about the mesa-commit
mailing list