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 adff67a..2d9f6d3 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 8a16fde..ba1a4c6 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()