Mesa (master): gallium: add an interface for querying a device reset status

Marek Olšák mareko at kemper.freedesktop.org
Tue May 12 17:40:43 UTC 2015


Module: Mesa
Branch: master
Commit: cacd0e290a7f510fe9cd78fde3156cd42f35a8b6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cacd0e290a7f510fe9cd78fde3156cd42f35a8b6

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Apr 29 15:04:34 2015 +0200

gallium: add an interface for querying a device reset status

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/gallium/include/pipe/p_context.h |    4 ++++
 src/gallium/include/pipe/p_defines.h |   13 +++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index adff67a..2d9f6d3 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -562,6 +562,10 @@ struct pipe_context {
    void (*invalidate_resource)(struct pipe_context *ctx,
                                struct pipe_resource *resource);
 
+   /**
+    * Return information about unexpected device resets.
+    */
+   enum pipe_reset_status (*get_device_reset_status)(struct pipe_context *ctx);
 };
 
 
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 8a16fde..ba1a4c6 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -476,6 +476,19 @@ enum pipe_flush_flags
 
 #define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull
 
+
+/**
+ * Device reset status.
+ */
+enum pipe_reset_status
+{
+   PIPE_NO_RESET = 0,
+   PIPE_GUILTY_CONTEXT_RESET = 1,
+   PIPE_INNOCENT_CONTEXT_RESET = 2,
+   PIPE_UNKNOWN_CONTEXT_RESET = 3
+};
+
+
 /**
  * Implementation capabilities/limits which are queried through
  * pipe_screen::get_param()




More information about the mesa-commit mailing list