diff options
author | Edward O'Callaghan <funfunctor@folklore1984.net> | 2016-08-26 22:33:45 +1000 |
---|---|---|
committer | Edward O'Callaghan <funfunctor@folklore1984.net> | 2016-08-26 22:44:43 +1000 |
commit | 4331eed7af77456fe99094bb805381b71149114b (patch) | |
tree | ba34db74926284019e088c95bd0c53ee19fa84d5 | |
parent | dfb4c7874e78000af197cdf93b4d42a4db3ff056 (diff) |
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index 15ab359f25..13285c861f 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -170,6 +170,28 @@ st_get_graphics_reset_status(struct gl_context *ctx) } } +/* + * XXX call somewhere??? + * + if (sctx->b.ctx.Const.ResetStrategy == GL_LOSE_CONTEXT_ON_RESET_ARB) + st_check_for_reset(sctx); + * + */ +static void +st_check_for_reset(struct gl_context *ctx) +{ + struct st_context *st = st_context(ctx); + enum pipe_reset_status status; + uint32_t pending; + + status = st->pipe->get_device_reset_status(st->pipe, &pending); + + if (status == PIPE_NO_RESET) + return; + + if (pending > 0) + _mesa_set_context_lost_dispatch(ctx); +} void st_init_flush_functions(struct pipe_screen *screen, struct dd_function_table *functions) |