gallium: add an interface for dumping debug driver state
authorMarek Olšák <marek.olsak@amd.com>
Sat, 11 Jul 2015 10:34:46 +0000 (12:34 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 26 Aug 2015 17:25:18 +0000 (19:25 +0200)
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/include/pipe/p_context.h
src/gallium/include/pipe/p_defines.h

index f89dae98a2f74015fc336fe0c186a8e994ac3d94..9d8f5bdc8d264532abb9e27b6f4bb3be6b74fe97 100644 (file)
@@ -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 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);
 };
 
 
index 2ba56eac7933834f31f0a8d7b55a62cf51b6aace..4f2aa14e12950067a29c50e98fc58668161e338c 100644 (file)
@@ -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.
  */