Mesa (19.3): mesa: avoid triggering assert in implementation
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 18 18:35:30 UTC 2019
Module: Mesa
Branch: 19.3
Commit: 687df737af0a07e90e5f9f0b303fc320f9a0839f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=687df737af0a07e90e5f9f0b303fc320f9a0839f
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Mon Dec 16 17:58:41 2019 +0200
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 at intel.com>
Cc: <mesa-stable at lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2235
Reviewed-by: Tapani Pälli <tapani.palli at 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 2c8742ed858c6446c93bddec117abf467a393c35)
---
src/mesa/main/performance_query.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/main/performance_query.c b/src/mesa/main/performance_query.c
index b9e7cf9961b..1eaf0bb1a76 100644
--- a/src/mesa/main/performance_query.c
+++ b/src/mesa/main/performance_query.c
@@ -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);
}
More information about the mesa-commit
mailing list