static enum pipe_reset_status si_get_reset_status(struct pipe_context *ctx)
{
struct si_context *sctx = (struct si_context *)ctx;
+ enum pipe_reset_status status = sctx->ws->ctx_query_reset_status(sctx->ctx);
- return sctx->ws->ctx_query_reset_status(sctx->ctx);
+ if (status != PIPE_NO_RESET && sctx->device_reset_callback.reset) {
+ sctx->device_reset_callback.reset(sctx->device_reset_callback.data,
+ status);
+ }
+ return status;
}
static void si_set_device_reset_callback(struct pipe_context *ctx,
sizeof(sctx->device_reset_callback));
}
-bool si_check_device_reset(struct si_context *sctx)
-{
- enum pipe_reset_status status;
-
- if (!sctx->device_reset_callback.reset)
- return false;
-
- status = sctx->ws->ctx_query_reset_status(sctx->ctx);
- if (status == PIPE_NO_RESET)
- return false;
-
- sctx->device_reset_callback.reset(sctx->device_reset_callback.data, status);
- return true;
-}
-
/* Apitrace profiling:
* 1) qapitrace : Tools -> Profile: Measure CPU & GPU times
* 2) In the middle panel, zoom in (mouse wheel) on some bad draw call