- metrics_collect_available ();
-
- if (ctx->timer_begun_id) {
- glEndQuery (GL_TIME_ELAPSED);
- glDeleteQueries (1, &ctx->timer_begun_id);
- ctx->timer_begun_id = 0;
- }
-
- for (timer = ctx->timer_head;
- timer;
- timer = timer_next)
- {
- glDeleteQueries (1, &timer->id);
- timer_next = timer->next;
- free (timer);
- }
- ctx->timer_head = NULL;
- ctx->timer_tail = NULL;
-
- if (ctx->monitor_begun_id) {
- glEndPerfMonitorAMD (ctx->monitor_begun_id);
- glDeletePerfMonitorsAMD (1, &ctx->monitor_begun_id);
- ctx->monitor_begun_id = 0;
- }
-
- for (monitor = ctx->monitor_head;
- monitor;
- monitor = monitor_next)
- {
- glDeletePerfMonitorsAMD (1, &monitor->id);
- monitor_next = monitor->next;
- free (monitor);
- }
- ctx->monitor_head = NULL;
- ctx->monitor_tail = NULL;
-
- ctx->monitors_in_flight = 0;
+ metrics_destroy (ctx->metrics);
+}
+
+void
+context_counter_start (void)
+{
+ metrics_counter_start (current_context->metrics);