summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRhys Kidd <[email protected]>2018-08-10 12:40:09 -0400
committerEric Anholt <[email protected]>2018-12-20 11:31:19 -0800
commitacc481ad79e1b505966bad3140032e928761dabf (patch)
tree0c6dc64676fb5fde1fbd36720457a57d93abe1c6 /src/gallium
parentba36312fbd079658edc86015852f519c8290a09a (diff)
vc4: Wire up core pipe_debug_callback
This lets the driver use pipe_debug_message() for GL_ARB_debug_output. Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.c13
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c
index ffd7d4c8555..94969dcb133 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -85,6 +85,18 @@ vc4_texture_barrier(struct pipe_context *pctx, unsigned flags)
}
static void
+vc4_set_debug_callback(struct pipe_context *pctx,
+ const struct pipe_debug_callback *cb)
+{
+ struct vc4_context *vc4 = vc4_context(pctx);
+
+ if (cb)
+ vc4->debug = *cb;
+ else
+ memset(&vc4->debug, 0, sizeof(vc4->debug));
+}
+
+static void
vc4_invalidate_resource(struct pipe_context *pctx, struct pipe_resource *prsc)
{
struct vc4_context *vc4 = vc4_context(pctx);
@@ -164,6 +176,7 @@ vc4_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
pctx->priv = priv;
pctx->destroy = vc4_context_destroy;
pctx->flush = vc4_pipe_flush;
+ pctx->set_debug_callback = vc4_set_debug_callback;
pctx->invalidate_resource = vc4_invalidate_resource;
pctx->texture_barrier = vc4_texture_barrier;
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index 8a8d3b6d5b0..f8f47958d8f 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -405,6 +405,7 @@ struct vc4_context {
struct pipe_viewport_state viewport;
struct vc4_constbuf_stateobj constbuf[PIPE_SHADER_TYPES];
struct vc4_vertexbuf_stateobj vertexbuf;
+ struct pipe_debug_callback debug;
struct vc4_hwperfmon *perfmon;
/** @} */