return;
}
}
+
+void
+gen_perf_free_sample_bufs(struct gen_perf_context *perf_ctx)
+{
+ foreach_list_typed_safe(struct oa_sample_buf, buf, link,
+ &perf_ctx->free_sample_buffers)
+ ralloc_free(buf);
+
+ exec_list_make_empty(&perf_ctx->free_sample_buffers);
+}
const struct gen_perf_query_info *query);
struct oa_sample_buf * gen_perf_get_free_sample_buf(struct gen_perf_context *perf);
void gen_perf_reap_old_sample_buffers(struct gen_perf_context *perf_ctx);
+void gen_perf_free_sample_bufs(struct gen_perf_context *perf_ctx);
#endif /* GEN_PERF_H */
_mesa_HashWalk(ctx->PerfQuery.Objects, dump_perf_query_callback, brw);
}
-/******************************************************************************/
-
-static void
-free_sample_bufs(struct brw_context *brw)
-{
- foreach_list_typed_safe(struct oa_sample_buf, buf, link,
- &brw->perf_ctx.free_sample_buffers)
- ralloc_free(buf);
-
- exec_list_make_empty(&brw->perf_ctx.free_sample_buffers);
-}
-
-/******************************************************************************/
-
/**
* Driver hook for glGetPerfQueryInfoINTEL().
*/
* buffers and close any current i915-perf stream.
*/
if (--brw->perf_ctx.n_query_instances == 0) {
- free_sample_bufs(brw);
+ gen_perf_free_sample_bufs(&brw->perf_ctx);
close_perf(brw, obj->query);
}