iris/perf: add delete query
authorMark Janes <mark.a.janes@intel.com>
Wed, 3 Jul 2019 19:50:01 +0000 (12:50 -0700)
committerMark Janes <mark.a.janes@intel.com>
Sat, 10 Aug 2019 02:28:17 +0000 (19:28 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_monitor.c
src/gallium/drivers/iris/iris_monitor.h

index 37c5bd93a2754a8c82dcc49186e241c4269e8e28..8733260d926f8ca2dfb5f240b008704922838a6d 100644 (file)
@@ -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);
+}
index db014d079e9d3bc9417b3ff83bd54b844c4ebda1..b3279f4a3118500c12d844b44855f934fd03fd38 100644 (file)
@@ -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