mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
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 <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
parent
c847bfaaf5
commit
93707457b6
1 changed files with 14 additions and 12 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue