Mesa (master): freedreno: wire up core pipe_debug_callback

Rob Clark robclark at kemper.freedesktop.org
Sat Apr 30 18:56:52 UTC 2016


Module: Mesa
Branch: master
Commit: 41d288c306db886d15e1fa32aa3bc677b8750321
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=41d288c306db886d15e1fa32aa3bc677b8750321

Author: Rob Clark <robclark at freedesktop.org>
Date:   Sun Apr 24 16:42:15 2016 -0400

freedreno: wire up core pipe_debug_callback

Signed-off-by: Rob Clark <robclark at freedesktop.org>

---

 src/gallium/drivers/freedreno/freedreno_context.c | 13 +++++++++++++
 src/gallium/drivers/freedreno/freedreno_context.h |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index c54bb10..52557d1 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -211,6 +211,18 @@ fd_context_destroy(struct pipe_context *pctx)
 	FREE(ctx);
 }
 
+static void
+fd_set_debug_callback(struct pipe_context *pctx,
+		const struct pipe_debug_callback *cb)
+{
+	struct fd_context *ctx = fd_context(pctx);
+
+	if (cb)
+		ctx->debug = *cb;
+	else
+		memset(&ctx->debug, 0, sizeof(ctx->debug));
+}
+
 struct pipe_context *
 fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen,
 		const uint8_t *primtypes, void *priv)
@@ -237,6 +249,7 @@ fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen,
 	pctx->priv = priv;
 	pctx->flush = fd_context_flush;
 	pctx->emit_string_marker = fd_emit_string_marker;
+	pctx->set_debug_callback = fd_set_debug_callback;
 
 	for (i = 0; i < ARRAY_SIZE(ctx->rings); i++) {
 		ctx->rings[i] = fd_ringbuffer_new(screen->pipe, 0x100000);
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index 8699296..e65688e 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -369,6 +369,8 @@ struct fd_context {
 	bool cond_cond; /* inverted rendering condition */
 	uint cond_mode;
 
+	struct pipe_debug_callback debug;
+
 	/* GMEM/tile handling fxns: */
 	void (*emit_tile_init)(struct fd_context *ctx);
 	void (*emit_tile_prep)(struct fd_context *ctx, struct fd_tile *tile);




More information about the mesa-commit mailing list