From 7b5c92391f15533ec02327d617c4e8639a2f8bb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 11 Jul 2015 12:34:46 +0200 Subject: [PATCH] gallium: add an interface for dumping debug driver state MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Paul Acked-by: Christian König Acked-by: Alex Deucher --- src/gallium/include/pipe/p_context.h | 12 ++++++++++++ src/gallium/include/pipe/p_defines.h | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index f89dae98a2f..9d8f5bdc8d2 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -32,6 +32,7 @@ #include "p_format.h" #include "p_video_enums.h" #include "p_defines.h" +#include #ifdef __cplusplus extern "C" { @@ -617,6 +618,17 @@ struct pipe_context { * Return information about unexpected device resets. */ enum pipe_reset_status (*get_device_reset_status)(struct pipe_context *ctx); + + /** + * Dump driver-specific debug information into a stream. This is + * used by debugging tools. + * + * \param ctx pipe context + * \param stream where the output should be written to + * \param flags a mask of PIPE_DEBUG_* flags + */ + void (*dump_debug_state)(struct pipe_context *ctx, FILE *stream, + unsigned flags); }; diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 2ba56eac793..4f2aa14e129 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -328,6 +328,11 @@ enum pipe_flush_flags PIPE_FLUSH_END_OF_FRAME = (1 << 0) }; +/** + * Flags for pipe_context::dump_debug_state. + */ +#define PIPE_DEBUG_DEVICE_IS_HUNG (1 << 0) + /** * Flags for pipe_context::memory_barrier. */ -- 2.30.2