mesa: don't share reset status across contexts
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 7 Apr 2023 07:28:43 +0000 (09:28 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Apr 2023 12:06:08 +0000 (12:06 +0000)
commit71c5db5e11290cf1e37346b9ad8ba07320586857
tree20c647f4ce3fe3ac977220b8bb9300b5f14a9447
parentb4a2cb1e166891ee64a8971a43a42e7e0280a80e
mesa: don't share reset status across contexts

If Driver.GetGraphicsResetStatus exists for one context, other contexts
will be able to use it; so there's no need to inherit reset status from
the other contexts.

This also prevented implementing the spec correctly: we're supposed to
report GL_NO_ERROR when the reset is completed (after reporting GL_*_RESET
at least once):

    If a reset status other than NO_ERROR is returned and subsequent
    calls return NO_ERROR, the context reset was encountered and
    completed. If a reset status is repeatedly returned, the context may
    be in the process of resetting.

With the existing code, the contexts will report INNOCENT_CONTEXT_RESET
forever.

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290>
src/mesa/main/robustness.c