mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-31 13:30:42 +01:00
radeonsi: avoid querying gpu state if possible
No-op dispatch should only be setup for full reset, not soft-recovery resets. The same trick cannot be used in si_get_reset_status because EGL expects us to return GL_***_CONTEXT_RESET even if it has been fixed by a soft recovery. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179>
This commit is contained in:
parent
8fd912b9ae
commit
a86450e00a
1 changed files with 9 additions and 7 deletions
|
|
@ -96,13 +96,15 @@ void si_flush_gfx_cs(struct si_context *ctx, unsigned flags, struct pipe_fence_h
|
|||
!(flags & RADEON_FLUSH_TOGGLE_SECURE_SUBMISSION))
|
||||
return;
|
||||
|
||||
/* Calling get_device_reset_status is useful to re-create the
|
||||
* aux context if needed.
|
||||
* This cs will be submitted even if a reset is detected; in this
|
||||
* case it'll treated as a no-op. This ensures that all states
|
||||
* are properly reset.
|
||||
*/
|
||||
ctx->b.get_device_reset_status(&ctx->b);
|
||||
/* Non-aux contexts must set up no-op API dispatch on GPU resets. This is
|
||||
* similar to si_get_reset_status but here we can ignore soft-recoveries,
|
||||
* while si_get_reset_status can't. */
|
||||
if (!(ctx->context_flags & SI_CONTEXT_FLAG_AUX) &&
|
||||
ctx->device_reset_callback.reset) {
|
||||
enum pipe_reset_status status = ctx->ws->ctx_query_reset_status(ctx->ctx, true, NULL);
|
||||
if (status != PIPE_NO_RESET)
|
||||
ctx->device_reset_callback.reset(ctx->device_reset_callback.data, status);
|
||||
}
|
||||
|
||||
if (sscreen->debug_flags & DBG(CHECK_VM))
|
||||
flags &= ~PIPE_FLUSH_ASYNC;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue