From 8c4c346665c7bed811e7ecad3bbea69b4b8d2bb7 Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Wed, 3 Jul 2019 12:50:01 -0700 Subject: [PATCH] iris/perf: add delete query Reviewed-by: Kenneth Graunke --- src/gallium/drivers/iris/iris_monitor.c | 12 ++++++++++++ src/gallium/drivers/iris/iris_monitor.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/src/gallium/drivers/iris/iris_monitor.c b/src/gallium/drivers/iris/iris_monitor.c index 37c5bd93a27..8733260d926 100644 --- a/src/gallium/drivers/iris/iris_monitor.c +++ b/src/gallium/drivers/iris/iris_monitor.c @@ -378,3 +378,15 @@ allocation_failure: free(monitor); return NULL; } + +void iris_destroy_monitor_object(struct pipe_context *ctx, + struct iris_monitor_object *monitor) +{ + struct iris_context *ice = (struct iris_context *)ctx; + gen_perf_delete_query(ice->perf_ctx, monitor->query); + free(monitor->result_buffer); + monitor->result_buffer = NULL; + free(monitor->active_counters); + monitor->active_counters = NULL; + free(monitor); +} diff --git a/src/gallium/drivers/iris/iris_monitor.h b/src/gallium/drivers/iris/iris_monitor.h index db014d079e9..b3279f4a311 100644 --- a/src/gallium/drivers/iris/iris_monitor.h +++ b/src/gallium/drivers/iris/iris_monitor.h @@ -53,4 +53,8 @@ iris_create_monitor_object(struct iris_context *ice, unsigned num_queries, unsigned *query_types); +struct pipe_query; +void iris_destroy_monitor_object(struct pipe_context *ctx, + struct iris_monitor_object *monitor); + #endif -- 2.30.2