summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
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/drivers
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/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_queryobj.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index c6bd57130de..c48f8539275 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -36,6 +36,7 @@
* needs.
*/
#include "main/imports.h"
+#include "main/queryobj.h"
#include "brw_context.h"
#include "brw_defines.h"
@@ -239,8 +240,7 @@ brw_delete_query(struct gl_context *ctx, struct gl_query_object *q)
struct brw_query_object *query = (struct brw_query_object *)q;
brw_bo_unreference(query->bo);
- free(query->Base.Label);
- free(query);
+ _mesa_delete_query(ctx, q);
}
/**
diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.c b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
index baf7081994c..c75c1e03a4a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_queryobj.c
+++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
@@ -29,6 +29,7 @@
#include "radeon_debug.h"
#include "main/imports.h"
+#include "main/queryobj.h"
#include <inttypes.h>
@@ -80,7 +81,7 @@ static void radeonDeleteQuery(struct gl_context *ctx, struct gl_query_object *q)
radeon_bo_unref(query->bo);
}
- free(query);
+ _mesa_delete_query(ctx, q);
}
static void radeonWaitQuery(struct gl_context *ctx, struct gl_query_object *q)