Commit 2c8742ed authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Marge Bot

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's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: mesa/mesa#2235Reviewed-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
Tested-by: Marge Bot <mesa/mesa!3115>
Part-of: <mesa/mesa!3115>
parent d399f4f4
Pipeline #89842 passed with stages
in 16 minutes and 27 seconds
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment