[Mesa-dev] [PATCH 1/3] gallium: add an interface for dumping debug driver state
Marek Olšák
maraeo at gmail.com
Sat Jul 25 10:08:13 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
---
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 f89dae9..52f51f6 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 <stdio.h>
#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 will be
+ * 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 68c536f..d7ac3c3 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -329,6 +329,11 @@ enum pipe_flush_flags
};
/**
+ * Flags for pipe_context::dump_debug_state.
+ */
+#define PIPE_DEBUG_DEVICE_IS_HUNG (1 << 0)
+
+/**
* Flags for pipe_context::memory_barrier.
*/
#define PIPE_BARRIER_MAPPED_BUFFER (1 << 0)
--
2.1.4
More information about the mesa-dev
mailing list