diff options
author | Mark Janes <[email protected]> | 2019-06-26 11:43:20 -0700 |
---|---|---|
committer | Mark Janes <[email protected]> | 2019-08-07 21:33:55 -0700 |
commit | 79ded7cc8f0b146bdf153f12093b6b6766fcf06b (patch) | |
tree | 7d2e81ca74c38e39365dbe27ef9cd9b76b740863 /src/mesa/drivers/dri | |
parent | f57c8a6dc110e7701233f159ce166c63ea75ff5f (diff) |
intel/perf: move close_perf into perf
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_performance_query.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c index 770dcb4a9c6..f4e62de3b7d 100644 --- a/src/mesa/drivers/dri/i965/brw_performance_query.c +++ b/src/mesa/drivers/dri/i965/brw_performance_query.c @@ -696,22 +696,6 @@ open_i915_perf_oa_stream(struct brw_context *brw, } static void -close_perf(struct brw_context *brw, - const struct gen_perf_query_info *query) -{ - struct gen_perf_context *perf_ctx = &brw->perf_ctx; - if (perf_ctx->oa_stream_fd != -1) { - close(perf_ctx->oa_stream_fd); - perf_ctx->oa_stream_fd = -1; - } - if (query->kind == GEN_PERF_QUERY_TYPE_RAW) { - struct gen_perf_query_info *raw_query = - (struct gen_perf_query_info *) query; - raw_query->oa_metrics_set_id = 0; - } -} - -static void capture_frequency_stat_register(struct brw_context *brw, struct brw_bo *bo, uint32_t bo_offset) @@ -817,7 +801,7 @@ brw_begin_perf_query(struct gl_context *ctx, o->Id, perf_ctx->current_oa_metrics_set_id, metric_id); return false; } else - close_perf(brw, query); + gen_perf_close(perf_ctx, query); } /* If the OA counters aren't already on, enable them. */ @@ -1384,7 +1368,7 @@ brw_delete_perf_query(struct gl_context *ctx, */ if (--perf_ctx->n_query_instances == 0) { gen_perf_free_sample_bufs(perf_ctx); - close_perf(brw, obj->queryinfo); + gen_perf_close(perf_ctx, obj->queryinfo); } free(obj); |