aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-10-16 17:12:43 -0400
committerMarek Olšák <[email protected]>2019-10-17 14:56:23 -0400
commit93707457b61d276570b5e76154b073a053f63cb5 (patch)
tree675dca0178cbf2882a349d17f8cbf8972221f1e3 /src/mesa
parentc847bfaaf5cf4ef2550bb90e6f9db81db1870ee0 (diff)
st/mesa: call the reset callback if glGetGraphicsResetStatus returns a failure
so that we immediately set the no-op dispatch Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_flush.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index 81e5338f795..36f7f2320c8 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -136,6 +136,18 @@ gl_reset_status_from_pipe_reset_status(enum pipe_reset_status status)
}
+static void
+st_device_reset_callback(void *data, enum pipe_reset_status status)
+{
+ struct st_context *st = data;
+
+ assert(status != PIPE_NO_RESET);
+
+ st->reset_status = status;
+ _mesa_set_context_lost_dispatch(st->ctx);
+}
+
+
/**
* Query information about GPU resets observed by this context
*
@@ -152,24 +164,14 @@ st_get_graphics_reset_status(struct gl_context *ctx)
st->reset_status = PIPE_NO_RESET;
} else {
status = st->pipe->get_device_reset_status(st->pipe);
+ if (status != PIPE_NO_RESET)
+ st_device_reset_callback(st, status);
}
return gl_reset_status_from_pipe_reset_status(status);
}
-static void
-st_device_reset_callback(void *data, enum pipe_reset_status status)
-{
- struct st_context *st = data;
-
- assert(status != PIPE_NO_RESET);
-
- st->reset_status = status;
- _mesa_set_context_lost_dispatch(st->ctx);
-}
-
-
void
st_install_device_reset_callback(struct st_context *st)
{