aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_monitor.c12
-rw-r--r--src/gallium/drivers/iris/iris_monitor.h4
2 files changed, 16 insertions, 0 deletions
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