aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMark Janes <[email protected]>2019-07-03 12:50:01 -0700
committerMark Janes <[email protected]>2019-08-09 19:28:17 -0700
commit8c4c346665c7bed811e7ecad3bbea69b4b8d2bb7 (patch)
tree3fdada7823a30e559aee1d704b4be9a031673d2b /src/gallium
parentaca42759ff8b32798156eb14b6d6d456aae76a59 (diff)
iris/perf: add delete query
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium')
-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