summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorYevhenii Kolesnikov <[email protected]>2019-08-01 14:11:44 +0300
committerEric Anholt <[email protected]>2019-08-07 17:25:22 +0000
commit4f767ded6effc60f7542089f368614f3d51bbba5 (patch)
treef2e67ccca85d27e5a03e0799cc5835563a0beca2 /src/mesa/main
parent4619535ab7d728166da6b417b192ceea13aab26e (diff)
mesa: use _mesa_delete_query in drivers
Now drivers can call _mesa_delete_query once driver-specific clean-up has been done. Brings into conformity with how other GL objects are handled. CC: Eric Anholt <[email protected]> CC: Kenneth Graunke <[email protected]> Suggested-by: Eric Anholt <[email protected]> Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/queryobj.c9
-rw-r--r--src/mesa/main/queryobj.h3
2 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 67d1f76a21a..b2740c5ea75 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -120,10 +120,15 @@ _mesa_check_query(struct gl_context *ctx, struct gl_query_object *q)
/**
- * Delete a query object. Called via ctx->Driver.DeleteQuery().
+ * Delete a query object. Called via ctx->Driver.DeleteQuery(), if not
+ * overwritten by driver. In the latter case, called from the driver
+ * after all driver-specific clean-up has been done.
* Not removed from hash table here.
+ *
+ * \param ctx GL context to wich query object belongs.
+ * \param q query object due to be deleted.
*/
-static void
+void
_mesa_delete_query(struct gl_context *ctx, struct gl_query_object *q)
{
free(q->Label);
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index 24a82571db0..ba8336b525a 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -48,6 +48,9 @@ _mesa_init_queryobj(struct gl_context *ctx);
extern void
_mesa_free_queryobj_data(struct gl_context *ctx);
+extern void
+_mesa_delete_query(struct gl_context *ctx, struct gl_query_object *q);
+
void GLAPIENTRY
_mesa_GenQueries(GLsizei n, GLuint *ids);
void GLAPIENTRY