[Mesa-dev] [PATCH v2 2/6] ddebug: add pass-through of set_device_reset_callback

Nicolai Hähnle nhaehnle at gmail.com
Tue Oct 4 08:11:20 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/gallium/drivers/ddebug/dd_context.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
index 4bcbbff..edcbf2c 100644
--- a/src/gallium/drivers/ddebug/dd_context.c
+++ b/src/gallium/drivers/ddebug/dd_context.c
@@ -713,20 +713,29 @@ dd_context_invalidate_resource(struct pipe_context *_pipe,
 
 static enum pipe_reset_status
 dd_context_get_device_reset_status(struct pipe_context *_pipe)
 {
    struct pipe_context *pipe = dd_context(_pipe)->pipe;
 
    return pipe->get_device_reset_status(pipe);
 }
 
 static void
+dd_context_set_device_reset_callback(struct pipe_context *_pipe,
+                                     const struct pipe_device_reset_callback *cb)
+{
+   struct pipe_context *pipe = dd_context(_pipe)->pipe;
+
+   return pipe->set_device_reset_callback(pipe, cb);
+}
+
+static void
 dd_context_emit_string_marker(struct pipe_context *_pipe,
                               const char *string, int len)
 {
    struct dd_context *dctx = dd_context(_pipe);
    struct pipe_context *pipe = dctx->pipe;
 
    pipe->emit_string_marker(pipe, string, len);
    dd_parse_apitrace_marker(string, len, &dctx->draw_state.apitrace_call_number);
 }
 
@@ -828,20 +837,21 @@ dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe)
    CTX_INIT(texture_subdata);
    CTX_INIT(texture_barrier);
    CTX_INIT(memory_barrier);
    /* create_video_codec */
    /* create_video_buffer */
    /* set_compute_resources */
    /* set_global_binding */
    CTX_INIT(get_sample_position);
    CTX_INIT(invalidate_resource);
    CTX_INIT(get_device_reset_status);
+   CTX_INIT(set_device_reset_callback);
    CTX_INIT(dump_debug_state);
    CTX_INIT(emit_string_marker);
 
    dd_init_draw_functions(dctx);
 
    dctx->draw_state.sample_mask = ~0;
 
    if (dscreen->mode == DD_DETECT_HANGS_PIPELINED) {
       dctx->fence = pipe_buffer_create(dscreen->screen, PIPE_BIND_CUSTOM,
                                             PIPE_USAGE_STAGING, 4);
-- 
2.7.4



More information about the mesa-dev mailing list