gallium: add an interface for querying a device reset status

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Marek Olšák
2015-04-29 15:04:34 +02:00
parent a533d4edf1
commit cacd0e290a
2 changed files with 17 additions and 0 deletions

View 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);
};

View 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()