diff options
author | Brian Paul <brianp@vmware.com> | 2015-12-04 12:26:35 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2015-12-07 08:57:49 -0700 |
commit | 32a6e081c3c301d0d02cb0f3e4f848a143bfa220 (patch) | |
tree | 5146fcc78ac91cb847eedd25a9739c3213f9f8f9 /src/gallium/drivers/svga/svga_pipe_misc.c | |
parent | 5effc3ae744807d03c6779040d752c74ed4abfbf (diff) | |
download | external_mesa3d-32a6e081c3c301d0d02cb0f3e4f848a143bfa220.zip external_mesa3d-32a6e081c3c301d0d02cb0f3e4f848a143bfa220.tar.gz external_mesa3d-32a6e081c3c301d0d02cb0f3e4f848a143bfa220.tar.bz2 |
svga: use the debug callback to report issues to the state tracker
Use the new debug callback hook to report conformance, performance
and fallbacks to the state tracker. The state tracker, in turn can
report this issues to the user via the GL_ARB_debug_output extension.
More issues can be reported in the future; this is just a start.
v2: remove conditionals around pipe_debug_message() calls since the
check is now done in the macro itself.
v3: remove unneeded dummy %s substitutions
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>,
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_misc.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_misc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c index c8020da..af9356d 100644 --- a/src/gallium/drivers/svga/svga_pipe_misc.c +++ b/src/gallium/drivers/svga/svga_pipe_misc.c @@ -244,6 +244,22 @@ static void svga_set_viewport_states( struct pipe_context *pipe, } +/** + * Called by state tracker to specify a callback function the driver + * can use to report info back to the state tracker. + */ +static void +svga_set_debug_callback(struct pipe_context *pipe, + const struct pipe_debug_callback *cb) +{ + struct svga_context *svga = svga_context(pipe); + + if (cb) + svga->debug.callback = *cb; + else + memset(&svga->debug.callback, 0, sizeof(svga->debug.callback)); +} + void svga_init_misc_functions( struct svga_context *svga ) { @@ -252,6 +268,7 @@ void svga_init_misc_functions( struct svga_context *svga ) svga->pipe.set_framebuffer_state = svga_set_framebuffer_state; svga->pipe.set_clip_state = svga_set_clip_state; svga->pipe.set_viewport_states = svga_set_viewport_states; + svga->pipe.set_debug_callback = svga_set_debug_callback; } |