summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-08-04 15:54:56 +0200
committerNicolai Hähnle <[email protected]>2017-08-22 09:50:48 +0200
commitbbaad18c04ad31eaaa945cf644f5f9693c2e1f5e (patch)
tree81fd9536954ade27b2023d692d7687754e7e8b6e /src/gallium/drivers/radeonsi/si_pipe.c
parentfbbb5f71cd02e33a4dc7bb1be5b468e638df7670 (diff)
radeonsi: implement pipe_context::set_log_context
We'll add radeonsi-specific code to set_log_context in later patches, but we may want to log from common code. Hence keep the log pointer in r600_common_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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 80a77a8f1f2..88fa97d3b0e 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -28,6 +28,7 @@
#include "radeon/radeon_uvd.h"
#include "util/hash_table.h"
+#include "util/u_log.h"
#include "util/u_memory.h"
#include "util/u_suballoc.h"
#include "util/u_tests.h"
@@ -157,6 +158,13 @@ si_create_llvm_target_machine(struct si_screen *sscreen)
LLVMCodeModelDefault);
}
+static void si_set_log_context(struct pipe_context *ctx,
+ struct u_log_context *log)
+{
+ struct si_context *sctx = (struct si_context *)ctx;
+ sctx->b.log = log;
+}
+
static struct pipe_context *si_create_context(struct pipe_screen *screen,
unsigned flags)
{
@@ -175,6 +183,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_log_context = si_set_log_context;
sctx->b.set_atom_dirty = (void *)si_set_atom_dirty;
sctx->screen = sscreen; /* Easy accessing of screen/winsys. */
sctx->is_debug = (flags & PIPE_CONTEXT_DEBUG) != 0;