From fc76cc05e39839c0933320f28b4cc9041d4e7770 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 30 Oct 2015 03:17:35 -0400 Subject: gallium: expose a debug message callback settable by context owner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will allow gallium drivers to send messages to KHR_debug endpoints Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák --- src/gallium/include/pipe/p_state.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/gallium/include/pipe/p_state.h') diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 4bf8d46c686..6bdf03a8b2b 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -684,6 +684,31 @@ struct pipe_compute_state unsigned req_input_mem; /**< Required size of the INPUT resource. */ }; +/** + * Structure that contains a callback for debug messages from the driver back + * to the state tracker. + */ +struct pipe_debug_callback +{ + /** + * Callback for the driver to report debug/performance/etc information back + * to the state tracker. + * + * \param data user-supplied data pointer + * \param id message type identifier, if pointed value is 0, then a + * new id is assigned + * \param type PIPE_DEBUG_TYPE_* + * \param format printf-style format string + * \param args args for format string + */ + void (*debug_message)(void *data, + unsigned *id, + enum pipe_debug_type type, + const char *fmt, + va_list args); + void *data; +}; + #ifdef __cplusplus } #endif -- cgit v1.2.3