From: Mark Janes Date: Wed, 3 Jul 2019 19:50:01 +0000 (-0700) Subject: iris/perf: add delete query X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c4c346665c7bed811e7ecad3bbea69b4b8d2bb7;p=mesa.git iris/perf: add delete query Reviewed-by: Kenneth Graunke --- 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