summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3d_program.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-12-20 07:45:58 -0800
committerEric Anholt <[email protected]>2018-12-30 08:03:51 -0800
commit696f63f1b472acd5efe32910c714469728fb5162 (patch)
treed8b7fc00b6f64a8c1e47f42a848a16f8438b5afc /src/gallium/drivers/v3d/v3d_program.c
parent87b251a94082fbc386a65670b1748daa7b44c00f (diff)
v3d: Hook up some shader-db output to GL_ARB_debug_output.
This allows the original shader-db project's run.c runner to parse things easily, and is probably a good thing to have for GL_ARB_debug_output in general. I formatted it more like Intel's so I can mostly reuse their report script.
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_program.c')
-rw-r--r--src/gallium/drivers/v3d/v3d_program.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c
index d6350682936..759fac117f2 100644
--- a/src/gallium/drivers/v3d/v3d_program.c
+++ b/src/gallium/drivers/v3d/v3d_program.c
@@ -307,6 +307,14 @@ v3d_shader_state_create(struct pipe_context *pctx,
return so;
}
+static void
+v3d_shader_debug_output(const char *message, void *data)
+{
+ struct v3d_context *v3d = data;
+
+ pipe_debug_message(&v3d->debug, SHADER_INFO, "%s", message);
+}
+
static struct v3d_compiled_shader *
v3d_get_compiled_shader(struct v3d_context *v3d, struct v3d_key *key)
{
@@ -343,6 +351,8 @@ v3d_get_compiled_shader(struct v3d_context *v3d, struct v3d_key *key)
qpu_insts = v3d_compile_vs(v3d->screen->compiler,
(struct v3d_vs_key *)key,
shader->prog_data.vs, s,
+ v3d_shader_debug_output,
+ v3d,
program_id, variant_id,
&shader_size);
break;
@@ -352,6 +362,8 @@ v3d_get_compiled_shader(struct v3d_context *v3d, struct v3d_key *key)
qpu_insts = v3d_compile_fs(v3d->screen->compiler,
(struct v3d_fs_key *)key,
shader->prog_data.fs, s,
+ v3d_shader_debug_output,
+ v3d,
program_id, variant_id,
&shader_size);
break;