summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-10-22 17:38:39 +0200
committerNicolai Hähnle <[email protected]>2017-11-09 11:53:19 +0100
commitdd7c273e873f20474e2af1959ab2928292020941 (patch)
tree8ce56e6db117c8380ab43436f27a093a6499ee32 /src/gallium/drivers/radeonsi/si_pipe.c
parent185061aef41401bead9e5d15aa00ffa2fcf7ef8c (diff)
radeonsi: move pipe debug callback to si_context
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 391997db842..7940fc8d5b2 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -154,6 +154,17 @@ si_create_llvm_target_machine(struct si_screen *sscreen)
return ac_create_target_machine(sscreen->b.family, tm_options);
}
+static void si_set_debug_callback(struct pipe_context *ctx,
+ const struct pipe_debug_callback *cb)
+{
+ struct si_context *sctx = (struct si_context *)ctx;
+
+ if (cb)
+ sctx->debug = *cb;
+ else
+ memset(&sctx->debug, 0, sizeof(sctx->debug));
+}
+
static void si_set_log_context(struct pipe_context *ctx,
struct u_log_context *log)
{
@@ -182,6 +193,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
sctx->b.b.priv = NULL;
sctx->b.b.destroy = si_destroy_context;
sctx->b.b.emit_string_marker = si_emit_string_marker;
+ sctx->b.b.set_debug_callback = si_set_debug_callback;
sctx->b.b.set_log_context = si_set_log_context;
sctx->b.set_atom_dirty = (void *)si_set_atom_dirty;
sctx->screen = sscreen; /* Easy accessing of screen/winsys. */