diff options
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 8 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 19 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index f5841d7c424..b97aad5e313 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -47,6 +47,7 @@ struct pipe_clip_state; struct pipe_constant_buffer; struct pipe_debug_callback; struct pipe_depth_stencil_alpha_state; +struct pipe_device_reset_callback; struct pipe_draw_info; struct pipe_grid_info; struct pipe_fence_handle; @@ -691,6 +692,13 @@ struct pipe_context { enum pipe_reset_status (*get_device_reset_status)(struct pipe_context *ctx); /** + * Sets the reset status callback. If the pointer is null, then no callback + * is set, otherwise a copy of the data should be made. + */ + void (*set_device_reset_callback)(struct pipe_context *ctx, + const struct pipe_device_reset_callback *cb); + + /** * Dump driver-specific debug information into a stream. This is * used by debugging tools. * diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 415ea85a2ad..46df196b6ed 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -831,6 +831,25 @@ struct pipe_debug_callback }; /** + * Structure that contains a callback for device reset messages from the driver + * back to the state tracker. + * + * The callback must not be called from driver-created threads. + */ +struct pipe_device_reset_callback +{ + /** + * Callback for the driver to report when a device reset is detected. + * + * \param data user-supplied data pointer + * \param status PIPE_*_RESET + */ + void (*reset)(void *data, enum pipe_reset_status status); + + void *data; +}; + +/** * Information about memory usage. All sizes are in kilobytes. */ struct pipe_memory_info |