mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
mesa: avoid triggering assert in implementation
When tearing down a GL context with an active performance query, the
implementation can be confused by a query marked active when it's
being deleted.
This shouldn't happen in the implementation because the context will
already be idle.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2235
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3115>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3115>
(cherry picked from commit 2c8742ed85)
This commit is contained in:
parent
1949c2a323
commit
687df737af
1 changed files with 6 additions and 0 deletions
|
|
@ -48,6 +48,12 @@ free_performance_query(GLuint key, void *data, void *user)
|
|||
struct gl_perf_query_object *m = data;
|
||||
struct gl_context *ctx = user;
|
||||
|
||||
/* Don't confuse the implementation by deleting an active query. We can
|
||||
* toggle Active/Used to false because we're tearing down the GL context
|
||||
* and it's already idle (see _mesa_free_context_data).
|
||||
*/
|
||||
m->Active = false;
|
||||
m->Used = false;
|
||||
ctx->Driver.DeletePerfQuery(ctx, m);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue