gallium: add an interface for querying a device reset status
authorMarek Olšák <marek.olsak@amd.com>
Wed, 29 Apr 2015 13:04:34 +0000 (15:04 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 12 May 2015 17:34:20 +0000 (19:34 +0200)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/include/pipe/p_context.h
src/gallium/include/pipe/p_defines.h

index adff67a88c8c62e74f76e99a2d9afbdf8df9ba41..2d9f6d35dc9b4dfad655a03b159e8ea8941c192f 100644 (file)
@@ -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);
 };
 
 
index 8a16fde22e7d9b8038b2a894f8f756c06260eab1..ba1a4c62f443d88a1cf1f4a42d7339ba7bd158ce 100644 (file)
@@ -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()