glthread: disable glthread if the context is lost
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
This commit is contained in:
parent
9d8301d602
commit
d052612317
|
@ -191,8 +191,13 @@ _mesa_glthread_flush_batch(struct gl_context *ctx)
|
||||||
if (!glthread->enabled)
|
if (!glthread->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!glthread->used)
|
if (ctx->CurrentServerDispatch == ctx->ContextLost) {
|
||||||
|
_mesa_glthread_destroy(ctx, "context lost");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!glthread->used)
|
||||||
|
return; /* the batch is empty */
|
||||||
|
|
||||||
/* Pin threads regularly to the same Zen CCX that the main thread is
|
/* Pin threads regularly to the same Zen CCX that the main thread is
|
||||||
* running on. The main thread can move between CCXs.
|
* running on. The main thread can move between CCXs.
|
||||||
|
|
Loading…
Reference in New Issue